Skip to content

Commit 392e76d

Browse files
committed
additional characters added to the game
1 parent ac16d44 commit 392e76d

13 files changed

Lines changed: 98 additions & 37 deletions

File tree

File renamed without changes.

.kiro/specs/character-selection-menu/design.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ private static class CharacterOption {
6161
}
6262
```
6363

64+
**Grid Layout:**
65+
- 2 columns × 4 rows = 8 character options
66+
- Cell size: 128×128 pixels
67+
- Preview size: 96×96 pixels (centered in cell)
68+
- Dialog dimensions: 550×800 pixels
69+
6470
### PlayerConfig Extension
6571

6672
Extends the existing PlayerConfig class to include character selection persistence.
@@ -115,21 +121,25 @@ Adds "Choose Character" menu option to the existing PlayerProfileMenu.
115121

116122
### Character Options
117123

118-
The system supports four character sprites:
124+
The system supports eight character sprites:
119125

120126
| Grid Position | Sprite Filename | Display Name |
121127
|--------------|-----------------|--------------|
122-
| Top-Left (0,0) | girl_red_start.png | Girl (Red) |
123-
| Top-Right (1,0) | girl_navy_start.png | Girl (Navy) |
124-
| Bottom-Left (0,1) | boy_red_start.png | Boy (Red) |
125-
| Bottom-Right (1,1) | boy_navy_start.png | Boy (Navy) |
128+
| Row 0, Col 0 | girl_red_start.png | Girl (Red) |
129+
| Row 0, Col 1 | girl_navy_start.png | Girl (Navy) |
130+
| Row 1, Col 0 | girl_green_start.png | Girl (Green) |
131+
| Row 1, Col 1 | girl_walnut_start.png | Girl (Walnut) |
132+
| Row 2, Col 0 | boy_red_start.png | Boy (Red) |
133+
| Row 2, Col 1 | boy_navy_start.png | Boy (Navy) |
134+
| Row 3, Col 0 | boy_green_start.png | Boy (Green) |
135+
| Row 3, Col 1 | boy_walnut_start.png | Boy (Walnut) |
126136

127137
### Grid Navigation
128138

129139
Grid cells are indexed as (column, row):
130140
- Navigation wraps around edges
131-
- UP from row 0 wraps to row 1
132-
- DOWN from row 1 wraps to row 0
141+
- UP from row 0 wraps to row 3
142+
- DOWN from row 3 wraps to row 0
133143
- LEFT from column 0 wraps to column 1
134144
- RIGHT from column 1 wraps to column 0
135145

@@ -155,8 +165,8 @@ Character preview frames are extracted from sprite sheets:
155165
### Property 1: Grid navigation wrapping
156166

157167
*For any* grid position (column, row) and any navigation direction (UP, DOWN, LEFT, RIGHT), navigating in that direction should move to the correct adjacent cell with wrapping at boundaries. Specifically:
158-
- UP from row 0 wraps to row 1
159-
- DOWN from row 1 wraps to row 0
168+
- UP from row 0 wraps to row 3
169+
- DOWN from row 3 wraps to row 0
160170
- LEFT from column 0 wraps to column 1
161171
- RIGHT from column 1 wraps to column 0
162172

@@ -243,13 +253,13 @@ The implementation will use **JUnit with QuickTheories** for property-based test
243253
Property-based tests will verify:
244254

245255
1. **Grid Navigation Property** (Property 1)
246-
- Generate random starting positions (column ∈ {0,1}, row ∈ {0,1})
256+
- Generate random starting positions (column ∈ {0,1}, row ∈ {0,1,2,3})
247257
- Generate random navigation directions (UP, DOWN, LEFT, RIGHT)
248258
- Verify navigation produces correct wrapped position
249259
- Tag: `**Feature: character-selection-menu, Property 1: Grid navigation wrapping**`
250260

251261
2. **Persistence Round-Trip Property** (Property 2)
252-
- Generate random valid character filenames from the set of 4 options
262+
- Generate random valid character filenames from the set of 8 options
253263
- Save character selection to config
254264
- Load config and verify same character is returned
255265
- Tag: `**Feature: character-selection-menu, Property 2: Character selection persistence round-trip**`

.kiro/specs/character-selection-menu/requirements.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ This document specifies the requirements for a character selection feature that
3333

3434
#### Acceptance Criteria
3535

36-
1. WHEN the Character Selection Menu is displayed THEN the system SHALL render a 2x2 grid of character preview cells
37-
2. WHEN rendering each grid cell THEN the system SHALL draw a 64x64 pixel square with a 2-pixel white border
38-
3. WHEN rendering character previews THEN the system SHALL display each character sprite at 48x48 pixels centered within its 64x64 pixel cell
39-
4. WHEN rendering character previews THEN the system SHALL extract the idle frame from position (0, 2048) of each character sprite sheet
40-
5. WHEN displaying the grid THEN the system SHALL show the following characters in order: girl_red_start.png (top-left), girl_navy_start.png (top-right), boy_red_start.png (bottom-left), boy_navy_start.png (bottom-right)
36+
1. WHEN the Character Selection Menu is displayed THEN the system SHALL render a 2x4 grid of character preview cells (2 columns, 4 rows)
37+
2. WHEN rendering each grid cell THEN the system SHALL draw a 128x128 pixel square with a 2-pixel white border
38+
3. WHEN rendering character previews THEN the system SHALL display each character sprite at 96x96 pixels centered within its 128x128 pixel cell
39+
4. WHEN rendering character previews THEN the system SHALL extract the idle frame from position (0, 1664) of each character sprite sheet
40+
5. WHEN displaying the grid THEN the system SHALL show the following characters in order: girl_red_start.png (row 0, col 0), girl_navy_start.png (row 0, col 1), girl_green_start.png (row 1, col 0), girl_walnut_start.png (row 1, col 1), boy_red_start.png (row 2, col 0), boy_navy_start.png (row 2, col 1), boy_green_start.png (row 3, col 0), boy_walnut_start.png (row 3, col 1)
4141

4242
### Requirement 3
4343

@@ -50,7 +50,7 @@ This document specifies the requirements for a character selection feature that
5050
3. WHEN the user presses the DOWN arrow key THEN the system SHALL move the selection to the cell below the current selection
5151
4. WHEN the user presses the LEFT arrow key THEN the system SHALL move the selection to the cell to the left of the current selection
5252
5. WHEN the user presses the RIGHT arrow key THEN the system SHALL move the selection to the cell to the right of the current selection
53-
6. WHEN the user navigates beyond the grid boundaries THEN the system SHALL wrap the selection to the opposite side of the grid
53+
6. WHEN the user navigates beyond the grid boundaries THEN the system SHALL wrap the selection to the opposite side of the grid (UP from row 0 wraps to row 3, DOWN from row 3 wraps to row 0, LEFT from column 0 wraps to column 1, RIGHT from column 1 wraps to column 0)
5454

5555
### Requirement 4
5656

@@ -85,5 +85,5 @@ This document specifies the requirements for a character selection feature that
8585
1. WHEN the Character Selection Menu is displayed THEN the system SHALL render all text using the LocalizationManager
8686
2. WHEN the user changes the game language THEN the system SHALL update the Character Selection Menu text to the new language
8787
3. WHEN the Character Selection Menu is opened THEN the system SHALL display the menu title in the current language
88-
4. WHEN localization files are loaded THEN the system SHALL include translations for "Choose Character" in all supported languages (English, German, Dutch, Polish, Portuguese)
88+
4. WHEN localization files are loaded THEN the system SHALL include translations for "Choose Character" and all 8 character names (Girl Red, Girl Navy, Girl Green, Girl Walnut, Boy Red, Boy Navy, Boy Green, Boy Walnut) in all supported languages (English, German, Dutch, Polish, Portuguese)
8989
5. WHEN the Character Selection Menu displays instructions THEN the system SHALL show keyboard navigation hints in the current language

assets/localization/de.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
"title": "Wähle Deinen Charakter",
2727
"girl_red": "Mädchen (Rot)",
2828
"girl_navy": "Mädchen (Marine)",
29+
"girl_green": "Mädchen (Grün)",
30+
"girl_walnut": "Mädchen (Walnuss)",
2931
"boy_red": "Junge (Rot)",
3032
"boy_navy": "Junge (Marine)",
33+
"boy_green": "Junge (Grün)",
34+
"boy_walnut": "Junge (Walnuss)",
3135
"navigation_instruction": "Pfeiltasten zum Navigieren",
3236
"confirm_instruction": "Enter zum Bestätigen",
3337
"cancel_instruction": "ESC zum Abbrechen"

assets/localization/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
"title": "Select Your Character",
2727
"girl_red": "Girl (Red)",
2828
"girl_navy": "Girl (Navy)",
29+
"girl_green": "Girl (Green)",
30+
"girl_walnut": "Girl (Walnut)",
2931
"boy_red": "Boy (Red)",
3032
"boy_navy": "Boy (Navy)",
33+
"boy_green": "Boy (Green)",
34+
"boy_walnut": "Boy (Walnut)",
3135
"navigation_instruction": "Arrow keys to navigate",
3236
"confirm_instruction": "Enter to confirm",
3337
"cancel_instruction": "ESC to cancel"

assets/localization/nl.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
"title": "Selecteer Je Karakter",
2727
"girl_red": "Meisje (Rood)",
2828
"girl_navy": "Meisje (Marine)",
29+
"girl_green": "Meisje (Groen)",
30+
"girl_walnut": "Meisje (Walnoot)",
2931
"boy_red": "Jongen (Rood)",
3032
"boy_navy": "Jongen (Marine)",
33+
"boy_green": "Jongen (Groen)",
34+
"boy_walnut": "Jongen (Walnoot)",
3135
"navigation_instruction": "Pijltjestoetsen om te navigeren",
3236
"confirm_instruction": "Enter om te bevestigen",
3337
"cancel_instruction": "ESC om te annuleren"

assets/localization/pl.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
"title": "Wybierz Swoją Postać",
2727
"girl_red": "Dziewczyna (Czerwona)",
2828
"girl_navy": "Dziewczyna (Granatowa)",
29+
"girl_green": "Dziewczyna (Zielona)",
30+
"girl_walnut": "Dziewczyna (Orzechowa)",
2931
"boy_red": "Chłopiec (Czerwony)",
3032
"boy_navy": "Chłopiec (Granatowy)",
33+
"boy_green": "Chłopiec (Zielony)",
34+
"boy_walnut": "Chłopiec (Orzechowy)",
3135
"navigation_instruction": "Strzałki do nawigacji",
3236
"confirm_instruction": "Enter aby potwierdzić",
3337
"cancel_instruction": "ESC aby anulować"

assets/localization/pt.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
"title": "Selecione Seu Personagem",
2727
"girl_red": "Menina (Vermelha)",
2828
"girl_navy": "Menina (Marinha)",
29+
"girl_green": "Menina (Verde)",
30+
"girl_walnut": "Menina (Nogueira)",
2931
"boy_red": "Menino (Vermelho)",
3032
"boy_navy": "Menino (Marinho)",
33+
"boy_green": "Menino (Verde)",
34+
"boy_walnut": "Menino (Nogueira)",
3135
"navigation_instruction": "Setas para navegar",
3236
"confirm_instruction": "Enter para confirmar",
3337
"cancel_instruction": "ESC para cancelar"
336 KB
Loading
337 KB
Loading

0 commit comments

Comments
 (0)