public Square[][] kinging(Square[][] theBoard)
    {
        for (int x = 0; x < 8; x++)// kinging.
        {
            if (theBoard[x][7].getPiece() == '@')
            {
                theBoard[x][7].king();
            } else if (theBoard[x][0].getPiece() == '$')
            {
                theBoard[x][0].king();
            }
        }
        return theBoard;
    }