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,14 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace Game.TicTacToe;
|
||||
|
||||
/// <summary>
|
||||
/// Global game state stored on the singleton entity.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public struct GameState
|
||||
{
|
||||
[Key(0)] public Player CurrentPlayer;
|
||||
[Key(1)] public GameStatus Status;
|
||||
[Key(2)] public int MoveCount;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Game.TicTacToe;
|
||||
|
||||
public enum GameStatus : byte
|
||||
{
|
||||
Playing = 0,
|
||||
XWon = 1,
|
||||
OWon = 2,
|
||||
Draw = 3
|
||||
}
|
||||
Reference in New Issue
Block a user