Corrected getBottomMostSquares() algorithm
Introduced BasePiece leveraging common functions and using
Javascript's support for inheritance