Example #1
0
 public bool TakingExists()
 {
     foreach (var draught in State.Arrangement)
     {
         var draughtInPlay = new ItemInPlay(draught, State);
         if (WhoseMove == draught.Colour() && draughtInPlay.TakingExists())
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
        public Paths SimpleMoves()
        {
            var moves = new Paths();

            foreach (var draught in State.Arrangement)
            {
                var draughtInPlay = new ItemInPlay(draught, State);
                if (WhoseMove == draught.Colour())
                {
                    moves.AddMoves(draughtInPlay.Moves());
                }
            }
            return(moves);
        }
Example #3
0
        public Paths Takings()
        {
            var moves = new Paths();

            foreach (var draught in State.Arrangement)
            {
                var draughtInPlay = new ItemInPlay(draught, State.Clone());
                if (WhoseMove == draught.Colour() && draughtInPlay.TakingExists())
                {
                    moves.AddMoves(draughtInPlay.Moves());
                }
            }
            return(moves);
        }