def test__setitem__coordinate(self): piece = pieces.BishopPiece('white') self.board[(2, 1)] = piece self.assertEqual(self.board._board[17], piece, errormessage(self.board._board[17], piece)) return None
def test_inequality(self): piece2 = pieces.BishopPiece('white') self.assertNotEqual( self.piece, piece2, errormessage( "%s == %s" % (self.piece, "BishopPiece"), "%s =/= %s" % (self.piece, "BishopPiece") ) ) return None
def setUp(self): self.board = chessboard.ChessBoard() self.board[0] = pieces.RookPiece('white') self.board[55] = pieces.RookPiece('white') self.board[4] = pieces.KingPiece('white') self.board[10] = pieces.PawnPiece('white') self.board[13] = pieces.PawnPiece('white') self.board[15] = pieces.PawnPiece('white') self.board[31] = pieces.BishopPiece('black') self.board[56] = pieces.RookPiece('black') self.board[60] = pieces.KingPiece('black') self.board[49] = pieces.PawnPiece('black') self.generator = movegenerator.MoveGenerator(self.board) return None
def setUp(self): self.piece = pieces.BishopPiece('white') return None