test: add unit tests for Blackjack and TicTacToe
- Add xUnit test projects for both games - Implement game flow tests for Blackjack - Implement game flow tests for TicTacToe - Rename namespaces and projects to follow `Game.*` convention - Add documentation for testing games
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace Game.TicTacToe;
|
||||
|
||||
/// <summary>
|
||||
/// Identifies a board position. One entity per cell.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public struct Cell
|
||||
{
|
||||
[Key(0)] public int Row;
|
||||
[Key(1)] public int Col;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace Game.TicTacToe;
|
||||
|
||||
/// <summary>
|
||||
/// A mark placed on a cell by a player.
|
||||
/// Only present on cells that have been claimed.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public struct Mark
|
||||
{
|
||||
[Key(0)] public Player Player;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Game.TicTacToe;
|
||||
|
||||
public enum Player : byte
|
||||
{
|
||||
None = 0,
|
||||
X = 1,
|
||||
O = 2
|
||||
}
|
||||
Reference in New Issue
Block a user