def test_King_Castle():
    """Tests if you can do king side castle
    """
    myGame = Game()

    def move(x, moveOne, moveTwo):
        x.board[x.possibleRow[int(
            moveOne[0])]][x.possibleCol[moveOne[1]]].move(
                int(moveTwo[0]), moveTwo[1])

    king = myGame.board[0][4]
    rook = myGame.board[0][7]
    move(myGame, "2E", "4E")
    move(myGame, "1F", "2E")
    move(myGame, "1G", "3H")
    myGame.attemptKingCastle(myGame.playerOneTurn)
    assert king == myGame.board[0][6]
    assert rook == myGame.board[0][5]
def test_White_King_Castle():
    """ Tests if White pieces can do king side castle
    """
    myGame = Game()

    def move(x, moveOne, moveTwo):
        x.board[x.possibleRow[int(
            moveOne[0])]][x.possibleCol[moveOne[1]]].move(
                int(moveTwo[0]), moveTwo[1])

    king = myGame.board[7][4]
    rook = myGame.board[7][7]
    move(myGame, "7E", "5E")
    move(myGame, "8F", "7E")
    move(myGame, "8G", "6H")
    myGame.attemptKingCastle(not myGame.playerOneTurn)
    assert king == myGame.board[7][6]
    assert rook == myGame.board[7][5]