예제 #1
0
        public Player GetPlayerThatCanSpendToken()
        {
            var movableSticker =
                ReversedProgressCells
                .Select(c => c.GetUnblockedSticker())
                .FirstOrDefault(s => s != null && CanMove(s));

            if (movableSticker != null)
            {
                return(movableSticker.Owner);
            }

            var blockedSticker = ReversedProgressCells
                                 .Select(c => c.GetBlockedSticker())
                                 .FirstOrDefault(s => s != null);

            if (blockedSticker != null)
            {
                return(blockedSticker.Owner);
            }

            return(null);
        }
예제 #2
0
 public Sticker GetMoveableStickerFor(Player player)
 {
     return(ReversedProgressCells
            .Select(c => c.GetUnblockedStickerFor(player))
            .FirstOrDefault(s => s != null && CanMove(s)));
 }
예제 #3
0
 public Sticker GetBlockedStickerFor(Player player)
 {
     return(ReversedProgressCells
            .Select(c => c.GetBlockedStickerFor(player))
            .FirstOrDefault(s => s != null));
 }