Esempio n. 1
0
        public Game(IList <Player> players, IDice dice, Board board, IGameStrategy gameStrategy)
        {
            _dice         = dice;
            _players      = new CircularLinkedList <Player>(players);
            _gameStrategy = gameStrategy;

            Board   = board;
            Players = players;
        }
        public Player GetNextPlayer(CircularLinkedList <Player> _players)
        {
            if (isPrime(_players.Current.Place))
            {
                _shouldSkip[_players.Current.Id] = true;
            }
            _players.MoveNext();
            if (_shouldSkip[_players.Current.Id])
            {
                _shouldSkip[_players.Current.Id] = false;
                _players.MoveNext();
            }

            return(_players.Current);
        }
 public Player GetNextPlayer(CircularLinkedList <Player> _players)
 {
     _players.MoveNext();
     return(_players.Current);
 }