Champions Arena
Project Intro

Welcome to the Champions' Arena!

Welcome to Champions' Arena, where strategy, creativity, and programming skill collide. In this project, you will design your own Champion, a powerful combatant with unique abilities, and equip them with a custom Loadout of battle modifiers.

Your Champion will face off against others in a dynamic battle system where every decision matters. As you breathe life into your Champion through object-oriented programming, you will wield the forces of inheritance, polymorphism, and dynamic design.

The Arena awaits your creation. Will your Champion rise to glory, or fall into the dust of the forgotten?

Overview

Your Final Project

You will design and battle with your own Champion, combining strategy, creativity, and object-oriented code into a single cohesive project.

Your grade reflects all three dimensions equally. The smarter and more creative your design, the stronger your Champion will be in the Arena.

The project culminates in a live Battle Day tournament, where Champions face off in front of the class.

Architecture

What You'll Be Building

Item Description
Champion Your custom fighter. With health, attack, and defense stats
Actions Special moves your Champion can take each turn (attack, heal, defend, etc.)
Relics Passive items that grant ongoing bonuses in battle
Tactics Active strategies that influence how your Champion fights
Gambits Powerful, high-risk / high-reward moves, often single use
Champion Structure

Each Champion Enters the Arena With:

Base stats: every Champion has an Attack value, a Defense value, and a Health pool. The total of Attack and Defense is capped, so building your Champion means making trade-off decisions.

A Loadout: one active Tactic, one active Relic, and one pocketed Gambit that modify battle outcomes while equipped.

An Arsenal: a hand of drawn Modifiers your Champion can swap into their Loadout between turns, giving the battle a strategic deck-management feel.

A set of Actions: the choices available each turn: Attack, Defend, or Play Gambit. Your Action implementations determine exactly how those choices unfold.

Battle Mechanics

Actions and Modifiers Interact:

When a Champion attacks, equipped Tactics and Relics can boost or reduce damage before it is applied.

Some modifiers trigger automatically based on conditions: attacking, defending, or thresholds you define in your code.

Some Actions require charging: the Champion prepares for multiple turns before unleashing a devastating move.

Gambits are powerful but risky, often single-use. Choose when to play them carefully.

A Champion's Attack and Defense stats are capped: any stat boosts from modifiers must stay within the maximum limit.

Final damage is calculated only after all modifiers have taken effect.

A Champion is defeated when their Health drops to zero or below.

Activity

Class Structure Exploration

Before you unleash your own Champion, it is important to understand the codebase that powers the Arena. Together we will explore the ChampionsArena repository and build a partial class diagram showing the major classes and how they connect.

Your tools:

  • ChampionsArena GitHub repository
  • Gemini
  • Post-it notes
  • Group discussion

As we explore, focus on inheritance, shared behavior, and where the classes you will write will fit into the existing system.

Activity

Explore the ChampionsArena Repository

In a moment, you'll open the ChampionsArena repository to explore the code. Prepare yourself: there are a lot of classes to take in at once. We'll use Gemini to help you understand what you are seeing.

Ask Gemini to explain class roles, relationships, and important methods. But remember, the goal here is exploration, not getting Gemini to write your project.

You still need to verify Gemini's answers by reading the actual code. Gemini can be wrong, especially about the details of specific method signatures and behavior.
Activity

Ask Gemini Good Questions

As you explore, try questions like these to understand the ChampionsArena codebase:

  • What does this class do in the system?
  • Which classes extend BattleModifier?
  • What is the difference between Action and BattleModifier?
  • How does a Champion take a turn?
  • Which methods would a student most likely override?
  • Can you summarize the class hierarchy in this project?
  • What files should I read first to understand how battles work?
Activity

Document What You Discover

Open the Champions' Arena repository →
Create a Post-it for each class
  • Class name
  • Important fields
  • Important methods
  • What the class is responsible for
Then look for patterns
  • What do these classes have in common?
  • Which ones are abstract?
  • Which ones are designed to be extended?
Start with these classes
  • Champion
  • Action
  • BattleModifier
  • Tactic
  • Relic
  • Gambit
Use Gemini to get started, then confirm your findings by reading the code.
Activity

Examine the Provided Implementations

Create a Post-it for each
  • TrainingDummy
  • AdvancedTrainingDummy
  • ChargeBreaker
  • EmberCrystal
  • AdrenalSurge
For each, figure out:
  • What class does it extend?
  • What methods does it override?
  • What new behavior does it add?
  • How does it fit into battle?
Ask yourself:
  • What is similar across these classes?
  • What changes from one to another?
  • What does that tell you about how your own classes should work?
Activity

Create a Class Diagram

On a whiteboard, arrange your Post-its into a class diagram.

  • Use arrows to show relationships between classes.
  • Keep related classes close together.
  • Mark which classes are <<abstract>>, or are an <<interface>>.

As you arrange them, look for:

  • Which fields and methods are shared?
  • Where is inheritance being used?
  • Where will your own Champion, Actions, and Modifiers fit?
HAS-A contains a reference to IS-A inherits / extends
Checkpoint

Arena Investigation Checklist

Before moving on, make sure you can answer all of these questions:

  • What class is a Champion?
  • What class is an Action?
  • What class is the parent of Tactic, Relic, and Gambit?
  • What is the difference between abstract and concrete classes in this project?
  • Where do the example implementations show polymorphism?
  • What parts of the framework will you use without modifying?
Reference

One Possible Diagram

Champions Arena class diagram

Your diagram should help you figure out where your own Champion and abilities will fit into the system. Your diagram may be different from this one, and that's okay!

Setup

Create Your Champions' Arena Repository

You have explored the full ChampionsArena repository and can refer back to it whenever you want, but you will not need to modify those classes.

You will work from the ChampionStarter repository, which includes the Arena system as a compiled jar. That means you can focus entirely on writing your own classes, and your code will compile and run against the same framework everyone is using.

The next several slides walk you through getting your code set up.
Setup · Step 1

Create Your Repository

  1. Click here to create your own copy of the ChampionStarter repository.
  2. Fill in a name for the repository.
    • If you have a Champion name in mind, YourNameChampionName makes a great choice.
    • Otherwise, YourName‑Champion will work fine.
  3. Scroll down and click Create Repository.
Setup · Cloning

Cloning Your Repository

When you have your repository open on GitHub, you will see all of the files it contains.

Next you will make a local clone of this repository on your computer so you can write and run code.

GitHub repository file listing
Setup · Cloning

Cloning Your Repository

  1. Click the green < > Code button on your repository page.
  2. Make sure the Local tab is selected.
  3. Make sure HTTPS is selected.
  4. Click the Copy URL to clipboard button Copy URL To Clipboard button.
GitHub Code button dropdown with HTTPS URL
Setup · Cloning

Cloning Your Repository

  1. Press the ⊞ Windows key.
  2. Type code.
  3. Select Visual Studio Code from the results.
Windows search showing Visual Studio Code
Setup · Cloning

Cloning Your Repository

VS Code new window menu

If VS Code already has a project open, choose New Window from the File menu to get a fresh empty window.

Then open the Source Control panel by clicking the Source Control sidebar icon Source Control button on the left sidebar.

VS Code Source Control panel
Setup · Cloning

Cloning Your Repository

In the Source Control panel, click the Clone Repository button. A popup will appear at the top of your screen.

VS Code Source Control panel

Paste the URL you copied from GitHub into the box and press Enter.

Clone Repository URL input
Setup · Cloning

Cloning Your Repository

Folder selection dialog

A dialog will open so you can choose where to save the cloned repository. The Documents folder is a good choice. When cloning finishes, VS Code will ask if you want to open it. Click Open.

You will then be asked if you trust the authors of the files in the folder. Click Yes, I trust the authors so you will be able to run the code you write.

Trust authors dialog
Workflow

Working With Your Repository

When you modify files, the Source Control badge showing changed files Source Control button on the sidebar shows a badge with the number of changed files.

Source Control panel with changed files

Opening the Source Control panel lets you see those changed files. From there you can open the file, discard the changes, or stage the changes to include in a commit.

Workflow

Committing Changes to Your Repository

As you build your Champion, commit whenever you have a working feature or meaningful progress; do not wait until everything is done.

VS Code Source Control commit message and button

At the top of the Source Control panel, type a commit message explaining what you changed, then click Commit.

Workflow

Committing: Common Hiccups

If you forgot to type your commit message in the box, a new editor tab pops up asking for a commit message. Type your message at the top of the tab, press Ctrl-S to save, then close the tab.

VS Code commit message editor tab
No staged changes dialog asking to stage all

If VS Code says you have no staged changes, it means you did not tell it which files to include in the commit. Since you probably want to include all changed files, click Yes to stage and commit everything.

Workflow

Committing: Another Common Issue

git config error message in VS Code

If you see an error about needing to configure user.name and user.email, you need to tell git who you are before it will accept commits.

Press Ctrl-` (the backtick key next to 1 in the top-left of your keyboard) to open a Terminal.

Then run these two commands, substituting your own email and name:

git config --global user.email "your github email" git config --global user.name "your name"

Then try committing again.

Workflow

Syncing Your Repository

After committing, the Source Control panel will show a Sync Changes button.

Clicking this button will push your files to GitHub and pull down any changes that were made elsewhere.

Click Sync Changes then OK when the confirmation message appears.

Sync Changes button in VS Code
Sync confirmation dialog
Workflow

Working With Your Repository

The Source Control panel also gives you access to more advanced git operations through the ⋯ (three dots or kabob) menu at the top of the panel.

From there you can pull changes from another computer, push manually, branch to isolate changes, and much more.

Get comfortable committing and syncing regularly. Your repo is your backup.

VS Code Source Control dots menu showing more options