Пример #1
0
 public Directions(Appearance clothes)
 {
     DirectionsRequired = new List <IVector>();
     if (clothes.GetDirectionsForTaking)
     {
         DirectionsForTaking();
     }
     else if (clothes.Status == ItemStatus.King)
     {
         DirectionsForKing();
     }
     else if (clothes.Colour == ColourNames.White)
     {
         DirectionsForWhite();
     }
     else
     {
         DirectionsForBlack();
     }
 }
Пример #2
0
 public Position(SetOfItems state, ColourNames whoseMove)
 {
     this.state     = state;
     this.whoseMove = new Appearance(whoseMove);
 }
Пример #3
0
        private Item CreateDraught(IVector vector, Appearance clothes)
        {
            var square = geometry.ShiftSquare(MainItem.Coordinates, vector);

            return(new Item(square, clothes));
        }
Пример #4
0
 public bool AreEqual(Appearance clothes)
 {
     return(clothes.Colour == Colour && clothes.Status == Status);
 }
Пример #5
0
 public Item(Square square, Appearance clothes)
 {
     coordinates  = square;
     this.clothes = clothes;
 }
Пример #6
0
 public Item(string line)
 {
     clothes     = new Appearance(line[0]);
     coordinates = new Square(line.Substring(1, Constants.CHARS_CODE_SQUARE));
 }
Пример #7
0
 public Item(int first, int second, ColourNames colour)
 {
     coordinates = new Square(first, second);
     clothes     = new Appearance(colour);
 }