inial impl

This commit is contained in:
Michal Vrba
2026-08-28 13:59:36 +02:00
parent efec4e62c5
commit 6abf0f91a0
180 changed files with 64651 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
namespace Faraon.Core.Models;
public enum TurnState
{
Playing,
SelectingSuit,
PassScreen,
GameOver
}
public class GameState
{
public List<Player> Players { get; set; } = new();
public int CurrentPlayerIndex { get; set; } = 0;
public List<Card> DrawDeck { get; set; } = new();
public List<Card> DiscardPile { get; set; } = new();
public Suit? ActiveSuit { get; set; }
public int PendingDrawCount { get; set; } = 0;
public bool PendingSkip { get; set; } = false;
public RuleOptions Rules { get; set; } = new();
public bool IsGameOver { get; set; } = false;
public Player? LastFinishedPlayer { get; set; }
public int TurnCount { get; set; } = 0;
public TurnState TurnState { get; set; } = TurnState.Playing;
public Player? PendingHornikPlayer { get; set; }
public Card? TopCard => DiscardPile.Count > 0 ? DiscardPile[^1] : null;
public Player CurrentPlayer => Players.Count > 0 ? Players[CurrentPlayerIndex % Players.Count] : new Player();
public int ActivePlayersCount => Players.Count(p => !p.HasFinished);
}