move :: Board -> Int -> Maybe Board
move b n | b!!n /= E = Nothing
         | n > 8 || n < 0 = Nothing
         | gameOver b = Nothing
         | otherwise = Just (replace b n p)
  where p = whoseTurn b
move :: Board -> Int -> Maybe Board
move b n | b!!n /= E = Nothing
         | n > 8 || n < 0 = Nothing
         | gameOver b = Nothing
         | otherwise = Just (replace b n p)
  where p = whoseTurn b
move b n | b!!n /= E = Nothing
         | n > 8 || n < 0 = Nothing
         | gameOver b = Nothing
         | otherwise = Just (replace b n p)
  where p = whoseTurn b