Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

Crystal Caverns

A small turn-based console roguelite written in C# and .NET.

Run it

dotnet run

Use the arrow keys or WASD to move. Moving into a space alien attacks you. Find crystals, drink potions, collect lesson scrolls, and step onto the portal to descend. Press L during the game to review the .NET lessons you have found.

For a quick automated smoke test:

dotnet run -- --demo

What this teaches

  • Top-level programs and command-line arguments
  • Enums for finite sets of choices, such as tiles and directions
  • Records for lightweight immutable values, such as grid positions
  • Classes for entities with behavior and mutable state
  • Lists, queues, LINQ, and random generation
  • Nullable references and safe fallback values
  • Switch expressions for display logic
  • Game loops: input, update, enemy AI, render
  • Console rendering, colors, keyboard input, and host portability

Good next changes

  • Add weapons and armor with different stats
  • Add a save file using System.Text.Json
  • Split Program.cs into multiple files and namespaces
  • Add unit tests for movement, combat, and item pickup
  • Replace random cave generation with rooms and corridors

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages