* @param newX The desired X position
     * @param newY The desired Y position
     * @return true If move operation is succesful
     */
    private synchronized boolean tryMove(Shape newPiece, int newX, int newY)
    {
		for (int i = 0; i < 4; ++i)
    	{
            int x = newX + newPiece.x(i);
            int y = newY - newPiece.y(i);
            // if the x value is out of range return
            if (x < 0 || x >= SQUARES_IN_WIDTH || y < 0 || y >= SQUARES_IN_HEIGHT || shapeAt(x, y) != Tetromino.NoShape)
                return false;
        }
        
        curPiece = newPiece;
        curX = newX;
        curY = newY;
        repaint();
        
        return true;
    }