feat: add TicTacToe example project

Implement a complete Tic-Tac-Toe game using OECS to demonstrate
ECS patterns, including:
- Command pattern for placing marks
- System groups for logical updates and rendering
- CSV loading for initial board state
- Reactivity logging for observing entity and component changes
This commit is contained in:
2026-07-18 20:43:13 +08:00
parent dddddbdbd6
commit a19861c080
14 changed files with 467 additions and 0 deletions
@@ -0,0 +1,14 @@
using MessagePack;
namespace 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 TicTacToe;
public enum GameStatus : byte
{
Playing = 0,
XWon = 1,
OWon = 2,
Draw = 3
}