You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -70,159 +70,175 @@ Now let's define the requirements for the arena battle simulation so that you ca
70
70
71
71
### Using Agent Mode to Solve the Adventure
72
72
73
-
#### Step 1: Give Agent Mode a High-Level Task
73
+
#### Step 1: Create Basic Arena and Display System
74
74
75
-
In the Chat panel with "Agent" mode selected, provide a comprehensive prompt like:
75
+
In the Chat panel with "Agent" mode selected, start with this focused prompt. Replace `[ADD YOUR TARGET LANGUAGE]` in the **Project Setup** section with your preferred programming language.
76
76
77
77
```
78
-
Create a complete Gridlock Arena battle simulation system for the mystical land of Mythos. The system should:
79
-
80
-
1. **Project Setup**:
81
-
- Create a console application in your preferred language
82
-
- Single file implementation for simplicity (e.g., `The-Gridlock-Arena-of-Mythos.js`)
83
-
- Use modern module/import system for your chosen language
84
-
- Follow current best practices for project structure and dependencies
85
-
86
-
2. **Grid Arena Implementation**:
87
-
- 5x5 grid arena using a 2D array
88
-
- Grid coordinates: [row, column] where [0,0] is top-left
89
-
- Visual representation using Unicode characters:
90
-
- ⬜️ for empty cells
91
-
- Creature icons for occupied positions
92
-
- 🤺 for battle locations where creatures fought
93
-
94
-
3. **Creature Data Structure** (exactly as specified):
95
-
Each creature must have these properties:
96
-
- **name**: String identifier for the creature
97
-
- **start**: Starting position as [row, column] coordinates
98
-
- **moves**: Array of movement directions in sequence
99
-
- **power**: Integer representing battle strength
100
-
- **icon**: Unicode emoji for visual representation
101
-
102
-
**Required Creatures** (in this exact order):
103
-
| Name | Start Position | Move Sequence | Power | Icon |
- Use proper separation between calculation phase (determine new positions) and application phase (resolve battles, update positions)
176
-
- Clear the grid each round and rebuild it with current creature positions
177
-
- Group creatures by destination position to detect collisions
178
-
- Handle multi-creature battles correctly (not just 2-creature battles)
179
-
- Use modern language features and follow current coding standards
180
-
- **Algorithm Flow**: Display initial board → For each move: calculate new positions → resolve battles → update grid → display results
181
-
182
-
12. **Code Quality**:
183
-
- Include comprehensive error handling and documentation
184
-
- Create unit tests to ensure 100% test coverage
185
-
- Make the code efficient and maintainable
186
-
- Use clear, descriptive function and variable names
187
-
- Structure code with proper module exports/imports for testability
188
-
- Include build/run scripts appropriate for your chosen language
189
-
- Follow modern coding standards and best practices for your language
190
-
191
-
**Language-Specific Modern Practices** (choose what applies):
192
-
- **JavaScript/Node.js**: Use ES6 modules (import/export), create package.json with "type": "module"
193
-
- **Python**: Use modern Python with proper function definitions and data structures
194
-
- **C#**: Use modern C# features, records, enums, and proper class structure
195
-
- **Other languages**: Apply equivalent modern standards and tooling
196
-
197
-
**Critical Implementation Notes for All Languages**:
198
-
- Movement timing is crucial: render Initial Board first, then process each move and render results
199
-
- Battle resolution must handle multi-creature collisions correctly
200
-
- Score display should include creature emojis in quoted format
201
-
- Final output should match the expected battle timing exactly
202
-
203
-
IMPORTANT: If your output doesn't match the expected battle results in section 9, debug your movement logic. The battle timing is critical for the educational value of this adventure.
78
+
Create a basic arena display system for the Gridlock Arena of Mythos. Focus only on the foundational elements:
79
+
80
+
**Project Setup**:
81
+
- Create a new folder called "The-Gridlock-Arena-of-Mythos" for this project
82
+
- Create a console application using [ADD YOUR TARGET LANGUAGE].
83
+
- Use a single main file implementation for simplicity (example: `The-Gridlock-Arena-of-Mythos.js`, `the_gridlock_arena_of_mythos.py`, `GridlockArenaOfMythos.cs`, etc.)
84
+
- Use modern language features and best practices for your chosen language
85
+
86
+
**Arena Implementation**:
87
+
- 5x5 grid arena using a 2D array/matrix
88
+
- Grid coordinates: [row, column] where [0,0] is top-left
89
+
- Visual representation: ⬜️ for empty cells, creature icons for occupied positions
90
+
91
+
**Creature Data Structure** (exactly as specified):
92
+
Each creature should have these properties:
93
+
- **name**: String identifier for the creature
94
+
- **start**: Starting position as [row, column] coordinates
95
+
- **moves**: Array/list of movement directions in sequence
96
+
- **power**: Integer representing battle strength
97
+
- **icon**: Unicode emoji for visual representation
98
+
99
+
**Required Creatures Data**:
100
+
| Name | Start Position | Move Sequence | Power | Icon |
- **Move 2**: Dragon (7) defeats Ogre (5) and Troll (4) at [1,1] → Dragon gains 9 more points (total: 12)
191
+
- **Move 3**: Dragon and Wizard survive, no battles
192
+
193
+
**Final Expected Scores**:
194
+
{
195
+
'🐉 Dragon': 12,
196
+
'👺 Goblin': 0,
197
+
'👹 Ogre': 0,
198
+
'👿 Troll': 0,
199
+
'🧙 Wizard': 0
200
+
}
201
+
202
+
**Success Criteria**: Full battle simulation with correct battle resolution and final scores matching expected results.
203
+
```
204
+
205
+
#### Step 4: Add Testing and Polish
206
+
207
+
Enhance your working application with testing and production-ready features. No specific testing library is required, but you can update the prompt to use a language specific testing framework if you'd prefer.
208
+
209
+
```
210
+
Add comprehensive testing and polish to your completed battle simulation:
211
+
212
+
**Testing Requirements**:
213
+
- Create unit tests for all major functions (movement, battles, scoring) in a separate test file
214
+
- Test edge cases (boundary conditions, ties, single creatures)
215
+
- Ensure comprehensive test coverage
216
+
- Create a separate test file using your language's testing framework
217
+
218
+
**Code Quality Improvements**:
219
+
- Add comprehensive error handling and input validation
220
+
- Include documentation/comments for all functions
221
+
- Structure code with proper organization and modularity
222
+
- Add a demo script showing different battle scenarios
223
+
224
+
**Production Features**:
225
+
- Add the ability to run custom creature battles
226
+
- Include detailed console output and final battle results
- Format final scores display with emojis and proper styling
229
+
230
+
**Success Criteria**: Complete, tested, production-ready application with comprehensive test suite and clean, maintainable code structure.
231
+
```
216
232
217
-
#### Step 3: Interact and Refine
233
+
#### Step 5: Interact and Refine
218
234
219
235
As Agent Mode works, you can:
220
236
-**Approve or modify** proposed changes
221
237
-**Ask for improvements**: "Can you add special abilities for each creature type?"
222
238
-**Request explanations**: "Explain how the collision detection algorithm works"
223
239
-**Add features**: "Add support for larger grids and more creature types"
224
240
225
-
#### Step 4: Explore Advanced Features
241
+
#### Step 6: Explore Advanced Features
226
242
227
243
Once your basic system works, try asking Agent Mode to:
228
244
@@ -240,7 +256,7 @@ Enhance the Gridlock Arena system with these advanced features:
240
256
241
257
### Expected Output
242
258
243
-
When your Agent Mode implementation is complete, running the application should produce output similar to the following. AI is non-deterministic, so your results may vary slightly, but the structure should be similar.
259
+
When your Agent Mode implementation is complete, running the application should produce output similar to the following. AI is non-deterministic and the code that is generated will depend upon the model used, so your results may vary.
244
260
245
261
```
246
262
Initial Board
@@ -326,7 +342,7 @@ The battle has concluded! May the strongest creature be victorious!
326
342
327
343
#### Leverage Agent Mode's Autonomy
328
344
329
-
1.**Let it work**: Allow Agent Mode to complete multi-step tasks without interruption
345
+
1.**Let it work**: Allow Agent Mode to complete multi-step tasks without interruption (unless you need to refine)
330
346
2.**Review and approve**: Check the proposed changes before they're applied
331
347
3.**Iterate naturally**: Ask for improvements or modifications as needed
332
348
4.**Learn from the process**: Observe how Agent Mode structures and solves problems
0 commit comments