inial impl
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user