Beispiel #1
0
        //method for accepting pausing of one of players
        private (bool, bool) MakePauseOnPlayersWish(List <PlayingCard> cards, int playerNumber)
        {
            FoursHandler Handler = new FoursHandler(cards, playerNumber, amountOfPlayers);

            return(Handler.PlayerWantsToStop(ref PlayersCurrentData, ref status, ref temporaryPauseAmount,
                                             ref blockPossibilityOfTakingCard));
        }
Beispiel #2
0
        //method for handling cards of rank 4 - which player stops, and for how many rounds
        private (bool, bool) RankFourHandling(List <PlayingCard> cards, int playerNumber)
        {
            FoursHandler Handler = new FoursHandler(cards, playerNumber, amountOfPlayers);

            return(Handler.FourHandling(ref PlayersCurrentData, ref status, ref temporaryPauseAmount,
                                        ref blockPossibilityOfTakingCard));
        }
Beispiel #3
0
        private void DetermineTheNextPlayer(PlayingCard card)
        {
            NextPlayerDeterminator Determinator = new NextPlayerDeterminator();

            currentPlayer = Determinator.DetermineNextPlayerNumber(card, currentPlayer, PlayersCurrentData.Count, PlayersCurrentData);

            //after switching player, the fact that player already took the first card is not true
            FoursHandler.ResetFirstCardTookProperties(ref PlayersCurrentData);
        }
Beispiel #4
0
        //when it is turn of player that need to wait few turns, it need to be count, that he
        //did not make a move for several rows
        private bool DecrementStopTurnsOfPlayer(int playerNumber, bool justFourEnded)
        {
            FoursHandler Handler = new FoursHandler(null, playerNumber, amountOfPlayers);

            return(Handler.DecrementStopTurnsOfPlayer(ref PlayersCurrentData, currentPlayer, justFourEnded));
        }