movePiece :: Int -> Int -> Game ()
movePiece dx dy = do
  canMove <- checkCurrentPieceCanMove dx dy
  when canMove $ movePiece' dx dy
  where
    movePiece' dx dy = do
      current <- gets currentPiece
      let (x,y) = position current
      setCurrentPiece $ current { position = ((x + dx), (y + dy)) }


-- | Takes the current piece, slaps it on the board, and starts everything
  -- all over again
movePiece :: Int -> Int -> Game ()
movePiece dx dy = do
  canMove <- checkCurrentPieceCanMove dx dy
  when canMove $ movePiece' dx dy
  where
    movePiece' dx dy = do
      current <- gets currentPiece
      let (x,y) = position current
      setCurrentPiece $ current { position = ((x + dx), (y + dy)) }


-- | Takes the current piece, slaps it on the board, and starts everything
  -- all over again
movePiece dx dy = do
  canMove <- checkCurrentPieceCanMove dx dy
  when canMove $ movePiece' dx dy
  where
    movePiece' dx dy = do
      current <- gets currentPiece
      let (x,y) = position current
      setCurrentPiece $ current { position = ((x + dx), (y + dy)) }


-- | Takes the current piece, slaps it on the board, and starts everything
  -- all over again