bec5df7e88
Introduce CurrentTurn to Game (default 1) and expose it via GameInformationDto. Update GameManager to include CurrentTurn in the GameInformation payload, validate that a player can only Drop when it is their turn, and toggle CurrentTurn between 1 and 2 after a successful move. Also use a safe fallback (0) when game is null.
12 lines
310 B
C#
12 lines
310 B
C#
namespace API.Models.Game
|
|
{
|
|
public class GameInformationDto
|
|
{
|
|
public string Id { get; set; }
|
|
public List<Player> Players { get; set; }
|
|
public GameState? State { get; set; }
|
|
public int[,] CurrentField { get; set; }
|
|
public int CurrentTurn { get; set; }
|
|
}
|
|
}
|