Exemple #1
0
        public int CheckKingSiege(GameBoard board, int row, int col)
        {
            int sieged = 0;
            List <List <int> > adjacted = GameRules.Adjacted(row, col, board);

            foreach (List <int> position in adjacted)
            {
                if (board.Enemy(row, col, position[0], position[1]) && !board.IsKing(position[0], position[1]))
                {
                    sieged = 20;
                }
            }
            return(sieged);
        }
Exemple #2
0
        public int KingHunting(GameBoard board, int row, int col)
        {
            int hunt = 0;
            List <List <int> > adjacted = GameRules.Adjacted(row, col, board);

            foreach (List <int> position in adjacted)
            {
                if (board.Enemy(row, col, position[0], position[1]) && board.IsKing(position[0], position[1]))
                {
                    hunt += 2;
                }
            }
            return(hunt);
        }