示例#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);
 }