improvements
This commit is contained in:
@@ -13,7 +13,10 @@ public enum GameEventType
|
||||
PlayerRevived,
|
||||
PlayerFinished,
|
||||
GameOver,
|
||||
DeckReshuffled
|
||||
DeckReshuffled,
|
||||
RoundOver,
|
||||
PlayerEliminated,
|
||||
MatchWon
|
||||
}
|
||||
|
||||
public record GameEvent(
|
||||
|
||||
@@ -5,6 +5,7 @@ public enum TurnState
|
||||
Playing,
|
||||
SelectingSuit,
|
||||
PassScreen,
|
||||
RoundOver,
|
||||
GameOver
|
||||
}
|
||||
|
||||
@@ -25,7 +26,15 @@ public class GameState
|
||||
public Player? PendingHornikPlayer { get; set; }
|
||||
public Card? TopCard => DiscardPile.Count > 0 ? DiscardPile[^1] : null;
|
||||
|
||||
// Olympijský režim (Turnaj)
|
||||
public int RoundNumber { get; set; } = 1;
|
||||
public bool IsRoundOver { get; set; } = false;
|
||||
public Player? RoundLoser { get; set; }
|
||||
public Player? MatchWinner { get; set; }
|
||||
public bool IsMatchOver { get; set; } = false;
|
||||
|
||||
public Player CurrentPlayer => Players.Count > 0 ? Players[CurrentPlayerIndex % Players.Count] : new Player();
|
||||
|
||||
public int ActivePlayersCount => Players.Count(p => !p.HasFinished);
|
||||
public int ActivePlayersCount => Players.Where(p => !p.IsEliminated).Count(p => !p.HasFinished);
|
||||
public List<Player> ActiveTournamentPlayers => Players.Where(p => !p.IsEliminated).ToList();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,16 @@ public class Player
|
||||
|
||||
public bool IsSkipped { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Počet kariet do ruky v Olympijskom režime (kto prehrá kolo, klesá o 1).
|
||||
/// </summary>
|
||||
public int OlympicCardsCount { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Či je hráč vyradený z Olympijského turnaja.
|
||||
/// </summary>
|
||||
public bool IsEliminated => OlympicCardsCount <= 0;
|
||||
|
||||
public Player() { }
|
||||
|
||||
public Player(string name, PlayerType type, string avatar = "👤", AIDifficulty difficulty = AIDifficulty.Medium)
|
||||
|
||||
@@ -41,4 +41,10 @@ public class RuleOptions
|
||||
/// Zvolený vizuálny štýl balíčka ("original" alebo "spongebob").
|
||||
/// </summary>
|
||||
public string SelectedDeck { get; set; } = "original";
|
||||
|
||||
/// <summary>
|
||||
/// Olympijský režim: Vyraďovací turnaj. Kto prehrá kolo, má v ďalšom o 1 kartu menej.
|
||||
/// Hrá sa až kým nezostane iba jeden celkový víťaz.
|
||||
/// </summary>
|
||||
public bool OlympicMode { get; set; } = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user