Adding Match State controller

This commit is contained in:
Matt F 2026-05-12 10:31:23 -07:00
parent c100db52e5
commit abcefcd7f1
13 changed files with 445 additions and 99 deletions

View file

@ -610,20 +610,8 @@ namespace TD.Gameplay
}
}
/// <summary>
/// Maps a client ID to the PlayerSlot assigned to that client.
/// </summary>
/// <remarks>
/// STUB: Currently uses a trivial mapping where client 0 = Player1, client 1 = Player2,
/// etc. This will be replaced when MatchState / PlayerMatchState is implemented and
/// carries the authoritative client-to-slot assignment.
/// </remarks>
private static PlayerSlot ClientIdToPlayerSlot(ulong clientId)
{
byte slotByte = (byte)(clientId + 1);
if (slotByte < 1 || slotByte > 9) return PlayerSlot.None;
return (PlayerSlot)slotByte;
}
=> PlayerMatchState.SlotForClient(clientId);
private void Reject(PlacementRequest req, PlacementRejectionReason reason)
{