Esempio n. 1
0
        public void CommitPlay(CardPlayer actor)
        {
            gameBoard.NotifyCommitPlacements();
            actor.FillHand();
            actor.NotifyEndTurn();

            if (RemainingCards <= 0)
            {
                EndGame();
            }
            else
            {
                NextGameTurn(actor);
            }
        }
Esempio n. 2
0
        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]);
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        void NextGameTurn(CardPlayer actor)
        {
            CardPlayer next = GetNextPlayer(actor);

            next.NotifyStartTurn();
        }
Esempio n. 5
0
 public void NotifyPlayerQuit(CardPlayer actor)
 {
 }
Esempio n. 6
0
 public void CancelPlay(CardPlayer actor)
 {
     gameBoard.NotifyCancelPlacements();
 }