Files
4Gewinnt/API/Models/Game/GameInformationDto.cs
T
Jonas e8b45fa235 Add column drop, game info DTO, and disconnect
Introduce column-based drop mechanics and game info transfer; add disconnect handling and related API/interface updates. GameField API renamed Place->Drop and PlaceResult->DropResult, added ColumnFull, IsFull, and updated drop logic to insert at lowest empty row. Game model now exposes Players, adds GetPlayerByTag and makes StartGame public. New GameInformationDto conveys game state and field. Hub methods updated: GameCreated->GameJoined, RequestGameInformation, Place now forwards to Drop, and OnDisconnectedAsync notifies GameManager. GameManager implements RequestGameInformation, Drop (validates moves, broadcasts FieldUpdated and GameEnded on win/draw), improved JoinGame logic to auto-start when two players join, and handles player disconnects. Repository and interface extended with GetOneByConnectionId. Also tightened SignalR timeouts in Program.
2026-03-12 23:20:05 +01:00

11 lines
265 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; }
}
}