improvements

This commit is contained in:
Michal Vrba
2026-08-28 16:34:40 +02:00
parent 4803bc22a6
commit 02bca7c34a
212 changed files with 622 additions and 112 deletions
+4 -1
View File
@@ -13,7 +13,10 @@ public enum GameEventType
PlayerRevived,
PlayerFinished,
GameOver,
DeckReshuffled
DeckReshuffled,
RoundOver,
PlayerEliminated,
MatchWon
}
public record GameEvent(
+10 -1
View File
@@ -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();
}
+10
View File
@@ -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)
+6
View File
@@ -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;
}