public void CommitPlay(CardPlayer actor) { gameBoard.NotifyCommitPlacements(); actor.FillHand(); actor.NotifyEndTurn(); if (RemainingCards <= 0) { EndGame(); } else { NextGameTurn(actor); } }
CardPlayer GetNextPlayer(CardPlayer actor) { int i = 0; for ( ; i < players.Count; ++i) { if (players[i] == actor) { break; } } if (i == players.Count) { return(null); } return(players[(i + 1) % players.Count]); }
public void AddPlayer(CardPlayer player) { if (players.Contains(player) == true) { return; } if (player == null) { return; } //don't add players during a game if (nextCard > 0) { return; } players.Add(player); player.NotifyEndTurn(); }
void NextGameTurn(CardPlayer actor) { CardPlayer next = GetNextPlayer(actor); next.NotifyStartTurn(); }
public void NotifyPlayerQuit(CardPlayer actor) { }
public void CancelPlay(CardPlayer actor) { gameBoard.NotifyCancelPlacements(); }