csharp-practice
Hands-on C# exercises, kept public on purpose.
A repository of projects and exercises built while learning C#: trial and error rather than a finished product, kept public because the mistakes are the useful part. The first entry is a two-player Mancala, with the extra-turn and capture rules.
It exists for the same reason the console games repo does. Looking back at how a language was learned is more honest than pretending it was always known.
- 2025
- Everything
- C#, .NET
- C#100.0%
From the repository
- 1
- 295
- 48
- 2
Technical architecture
A .NET console application per exercise. The first is Mancala: twelve wells and two stores, sown counter-clockwise.
Game
- mancala/Program.cs
- Board state
- Turn loop
Sowing, the extra turn for landing in your own store, the opposite-well capture and the even-count capture on the opponent's side.
Engineering decisions
Re-solving a known problem
Mancala was first written in C. Writing it again in C# made the language the only variable.
Engineering checklist
The questions a reviewer asks, answered from the code — including the ones where the honest answer is no.
- Errors & loggingPartly
- Move input is parsed and range-checked before sowing.
- TestsNot yet
- Unit tests are the next step.
What I would change now
- Next: split the board into a class with unit tests, so the rules can be checked without playing.
One content panel for every client site, with an AI assistant built in.