Create db and db access. Add json converter for board array. Add tests for json conversion

This commit is contained in:
jheaps
2025-07-04 13:41:48 -06:00
parent ff1a131a3c
commit 7a532e52e1
18 changed files with 461 additions and 132 deletions
+5 -1
View File
@@ -9,7 +9,10 @@ namespace JoshHeaps.Net.Controllers;
[ApiController]
[Route("api/[controller]")]
public class ChessController(IChessService chessService, IHubContext<ChessHub> chessHub, IBackgroundTaskQueue queue) : ControllerBase
public class ChessController(
IChessService chessService,
IHubContext<ChessHub> chessHub,
IBackgroundTaskQueue queue) : ControllerBase
{
/// <summary>
/// Store of ongoing games.
@@ -31,6 +34,7 @@ public class ChessController(IChessService chessService, IHubContext<ChessHub> c
gameState.IsVsComputer = true;
gameState.WhiteJoined = true;
gameState.BlackJoined = true;
gameState.ComputerDifficulty = difficulty;
Guid playerId = Guid.NewGuid();
Guid computerId = Guid.NewGuid();
var isWhite = Random.Shared.Next(2) == 0;