added code to check the boundaries of the board so that the shapes may not be moved off screen; there is still a bug for rotate which will make the piece go off screen