checkPieceCanMove :: Block -> Int -> Int -> Game Bool
checkPieceCanMove block dx dy = do
  brd <- gets board
  let (x,y) = position block
      currentSlice = guts block
      currentsh@(R.Z :. w :. h) = extent currentSlice
      -- y+1 gets us the 
      boardSlice = computeVectorS $ extract (R.Z :. x+dx :. y+dy) currentsh brd
  if (y + h) >= boardHeight || (x + dx) < 0 || (x + dx) > (boardWidth - w) -- board edge check
    then return False -- Bottom of the board, left side of board, right side
    else let doesntCollide = not $ collide currentSlice boardSlice -- board contents check
         in return doesntCollide


-- | Board bounds checked move: won'd do anything if it can't move
checkPieceCanMove :: Block -> Int -> Int -> Game Bool
checkPieceCanMove block dx dy = do
  brd <- gets board
  let (x,y) = position block
      currentSlice = guts block
      currentsh@(R.Z :. w :. h) = extent currentSlice
      -- y+1 gets us the 
      boardSlice = computeVectorS $ extract (R.Z :. x+dx :. y+dy) currentsh brd
  if (y + h) >= boardHeight || (x + dx) < 0 || (x + dx) > (boardWidth - w) -- board edge check
    then return False -- Bottom of the board, left side of board, right side
    else let doesntCollide = not $ collide currentSlice boardSlice -- board contents check
         in return doesntCollide


-- | Board bounds checked move: won'd do anything if it can't move
checkPieceCanMove block dx dy = do
  brd <- gets board
  let (x,y) = position block
      currentSlice = guts block
      currentsh@(R.Z :. w :. h) = extent currentSlice
      -- y+1 gets us the 
      boardSlice = computeVectorS $ extract (R.Z :. x+dx :. y+dy) currentsh brd
  if (y + h) >= boardHeight || (x + dx) < 0 || (x + dx) > (boardWidth - w) -- board edge check
    then return False -- Bottom of the board, left side of board, right side
    else let doesntCollide = not $ collide currentSlice boardSlice -- board contents check
         in return doesntCollide


-- | Board bounds checked move: won'd do anything if it can't move