Scaffold ClassCrawler: C# .NET 8 turn-based dungeon crawler teaching project#1
Conversation
Co-authored-by: Merlissa09 <41809281+Merlissa09@users.noreply.github.com>
Co-authored-by: Merlissa09 <41809281+Merlissa09@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Bootstraps the initial ClassCrawler .NET 8 solution as a teaching scaffold: core game architecture is defined across Characters/Items/Combat/World/Events/Persistence/UI, with method bodies intentionally stubbed for students to implement, plus placeholder tests and CI.
Changes:
- Adds the
ClassCrawlerconsole app project with stubbed domain architecture (characters, items, combat, world, events, persistence, UI). - Adds
ClassCrawler.TestsxUnit project with skipped placeholder tests. - Adds GitHub Actions CI workflow and expands README with setup + structure.
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds project overview, getting started, and structure documentation. |
| .github/workflows/ci.yml | Adds CI to restore/build/test on PRs and main pushes. |
| ClassCrawler.sln | Adds solution file referencing app + test projects. |
| ClassCrawler/ClassCrawler.csproj | Defines net8.0 console app + Sqlite package reference. |
| ClassCrawler/Program.cs | Top-level entry point calling GameUI.Run(). |
| ClassCrawler/UI/GameUI.cs | Adds console UI loop scaffold with stubbed menu actions. |
| ClassCrawler/World/Room.cs | Adds Room model (enemies/items/exits) scaffold. |
| ClassCrawler/World/Dungeon.cs | Adds Dungeon model with stubbed movement/generation. |
| ClassCrawler/Persistence/GameState.cs | Adds GameState record scaffold. |
| ClassCrawler/Persistence/IGameRepository.cs | Adds persistence contract scaffold. |
| ClassCrawler/Persistence/LeaderboardEntry.cs | Adds leaderboard record scaffold. |
| ClassCrawler/Persistence/SqliteGameRepository.cs | Adds SQLite repository stub implementing IGameRepository. |
| ClassCrawler/Items/Item.cs | Adds base Item abstraction scaffold. |
| ClassCrawler/Items/Weapon.cs | Adds weapon item stub. |
| ClassCrawler/Items/Armor.cs | Adds armor item stub. |
| ClassCrawler/Items/Potion.cs | Adds potion item stub. |
| ClassCrawler/Characters/Character.cs | Adds base Character scaffold (stats + combat strategy). |
| ClassCrawler/Characters/Player.cs | Adds Player scaffold (inventory/XP/gold). |
| ClassCrawler/Characters/Enemy.cs | Adds Enemy scaffold (rewards + loot table). |
| ClassCrawler/Characters/Goblin.cs | Adds Goblin enemy scaffold with default stats. |
| ClassCrawler/Characters/Orc.cs | Adds Orc enemy scaffold with default stats. |
| ClassCrawler/Characters/Dragon.cs | Adds Dragon enemy scaffold with default stats. |
| ClassCrawler/Combat/ICombatStrategy.cs | Adds combat strategy interface scaffold. |
| ClassCrawler/Combat/CombatResult.cs | Adds per-action combat result record scaffold. |
| ClassCrawler/Combat/CombatOutcome.cs | Adds encounter outcome record scaffold. |
| ClassCrawler/Combat/MeleeStrategy.cs | Adds melee strategy stub. |
| ClassCrawler/Combat/MagicStrategy.cs | Adds magic strategy stub. |
| ClassCrawler/Combat/RangedStrategy.cs | Adds ranged strategy stub. |
| ClassCrawler/Combat/CombatEngine.cs | Adds combat engine stub. |
| ClassCrawler/Combat/CharacterFactory.cs | Adds factory stub for creating players/enemies. |
| ClassCrawler/Combat/LootResolver.cs | Adds loot resolver stub. |
| ClassCrawler/Events/GameEventType.cs | Adds event type enum scaffold. |
| ClassCrawler/Events/GameEvent.cs | Adds base event scaffold. |
| ClassCrawler/Events/IGameEventListener.cs | Adds event listener interface scaffold. |
| ClassCrawler/Events/GameEventSystem.cs | Adds pub/sub system stub. |
| ClassCrawler/Events/PlayerLevelUpEvent.cs | Adds concrete event type scaffold. |
| ClassCrawler/Events/EnemyDefeatedEvent.cs | Adds concrete event type scaffold. |
| ClassCrawler/Events/ItemPickedUpEvent.cs | Adds concrete event type scaffold. |
| ClassCrawler/Events/PlayerDeathEvent.cs | Adds concrete event type scaffold. |
| ClassCrawler.Tests/ClassCrawler.Tests.csproj | Adds net8.0 xUnit test project + reference to app. |
| ClassCrawler.Tests/CombatEngineTests.cs | Adds skipped placeholder test scaffold. |
| ClassCrawler.Tests/CombatStrategyTests.cs | Adds skipped placeholder test scaffold. |
| ClassCrawler.Tests/ItemTests.cs | Adds skipped placeholder test scaffold. |
| ClassCrawler.Tests/InventoryTests.cs | Adds skipped placeholder test scaffold. |
| ClassCrawler.Tests/LootResolverTests.cs | Adds skipped placeholder test scaffold. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Merlissa09 <41809281+Merlissa09@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
The GUID change in |
Bootstraps the full ClassCrawler solution from an empty repo — a teaching scaffold where all architecture is defined but core method bodies are intentionally left unimplemented for students to complete.
Solution layout
ClassCrawler.sln— traditional.slnformatClassCrawler/— net8.0 console app,Microsoft.Data.Sqlite 8.0.0ClassCrawler.Tests/— xUnit project referencing main appNamespaces & types
CharactersCharacter(abstract),Player,Enemy(abstract),Goblin,Orc,DragonItemsItem(abstract),Weapon,Armor,PotionCombatICombatStrategy,CombatResult/CombatOutcomerecords,MeleeStrategy,MagicStrategy,RangedStrategy,CombatEngine,CharacterFactory,LootResolverWorldRoom,DungeonEventsGameEventTypeenum,GameEvent,IGameEventListener, four concrete event types,GameEventSystemPersistenceGameState/LeaderboardEntryrecords,IGameRepository,SqliteGameRepositoryUIGameUIConventions applied throughout
throw new NotImplementedException()or// TODO: Implement— no logic///XML doc summaries on all public types and membersProgram.csis a single line:ClassCrawler.UI.GameUI.Run();(fully-qualified, nousingdirective)Tests
Five placeholder test classes (
CombatEngineTests,CombatStrategyTests,ItemTests,InventoryTests,LootResolverTests), each with one[Fact(Skip = "Not yet implemented")]test.CI
.github/workflows/ci.yml— triggers onpush: mainand all PRs; steps: checkout → setup-dotnet 8 → restore → build → test. Job scoped topermissions: contents: read.Original prompt
Create a C# .NET 8 solution called "ClassCrawler" — a turn-based dungeon crawler
game. This is a teaching scaffold: stub out the architecture but leave core method
bodies unimplemented (throw NotImplementedException or add a // TODO comment).
Students will complete the implementation.
Solution Structure
Namespaces
Use ClassCrawler.Characters, ClassCrawler.Items, ClassCrawler.Combat,
ClassCrawler.World, ClassCrawler.Events, ClassCrawler.Persistence, ClassCrawler.UI
Characters (ClassCrawler.Characters)
MaxHealth (int), AttackPower (int), Defense (int), Level (int), IsAlive (bool).
Abstract method TakeDamage(int amount). Virtual method GetDescription().
Gold (int). Methods: AddItem, RemoveItem, UseItem, AddExperience. All stubbed.
LootTable (List). Abstract method GetAttackDescription().
a distinct GetAttackDescription(). Bodies stubbed.
Items (ClassCrawler.Items)
Abstract method Use(Character target).
All Use() methods stubbed with // TODO.
Combat (ClassCrawler.Combat)
returning CombatResult.
CombatOutcome. Stubbed.
ExperienceEarned (int), GoldEarned (int).
and CreateEnemy(string type, int scalingLevel). Stubbed.
World (ClassCrawler.World)
IsCleared (bool), Exits (Dictionary<string, Room>).
Method MovePlayer(string direction) returning bool. Stubbed.
Static method GenerateDungeon() that creates a small 4-room test dungeon. Stubbed.
Events (ClassCrawler.Events)
PlayerDeathEvent — each calling base constructor with appropriate EventType.
Persistence (ClassCrawler.Persistence)
Inventory (List of item names).
SaveScore(string playerName, int score), GetLeaderboard() returning
List.
Add Microsoft.Data.Sqlite NuGet package reference.
UI (ClassCrawler.UI)
"Welcome to ClassCrawler!" and a main menu stub (New Game / Load Game /
Leaderboard / Quit) using a switch on console input. Stubbed.
Program.cs
Single line: GameUI.Run();
Tests (ClassCrawler.Tests)
ItemTests, InventoryTests, LootResolverTests. Each with one [Fact] test marked
with Skip = "Not yet implemented".
CI (.github/workflows/ci.yml)
GitHub Actions workflow that triggers on push to main and all pull requests.
Steps: checkout → setup-dotnet (version 8) → dotnet restore → dotnet build
--no-restore → dotnet test --no-build.
README.md
Title: ClassCrawler. Tagline: "A C# dungeon crawler where good object-oriented
design is your best weapon." Sections: Overview, Getting Started (clone +
dotnet run), Project Structure, and a placeholder Contributing section.
Additional rules
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.