Changed pieceSize to squareSize in the square method