예제 #1
0
 def it_can_put_a_piece(self):
     board = ChessBoard()
     origin_field = board.get_field(2, 6)
     target_field = board.get_field(2, 4)
     board.turn |should| equal_to("white")
     type(origin_field.piece) |should| be(Pawn)
     target_field.piece |should| be(None)
     white_pawn = board.get_piece(2, 6)
     board.put_piece(white_pawn, 2, 4)
     board.turn |should| equal_to("black")
     origin_field.piece |should| be(None)
     type(target_field.piece) |should| be(Pawn)