     if Grid.valid_coord?(grid, {row, col}) do
       {:ok, {row, col}}
     else
-      {:error, "coord #{inspect {row, col}} is not on the board"}
+      {:error, :coord_off_board}
     end
   end
 

    char - ?a + 1
  end

  @spec place_bomb(pid, coord) :: t
  def place_bomb(pid, coord) do
    case parse_coord(pid, coord) do
      {:ok, coord} ->
        do_place_bomb(pid, coord)
      {:error, reason} ->
        IO.puts "Error: #{reason}"
        get(pid)
    end
  end

  @spec do_place_bomb(pid, Grid.coord) :: t
  defp do_place_bomb(pid, coord) do
    Agent.get_and_update(pid, fn board ->
      new_board = %{board | grid: Grid.place_bomb(board.grid, coord)}
      {new_board, new_board}
    end)
  end

  @spec place_bombs(pid, [Grid.coord]) :: t
  def place_bombs(pid, coords) do
    Agent.get_and_update(pid, fn board ->
      new_board = %{board | grid: Grid.place_bombs(board.grid, coords)}
      {new_board, new_board}
    end)
  end

  @spec place_random_bombs(pid, pos_integer) :: t
  def place_random_bombs(pid, count \\ @bomb_count) do
    board = get(pid)
    _ = Utils.seed_the_prng(board.seed)
    coords =
      board.grid
      |> Grid.active_squares
      |> Map.keys
      |> Enum.take_random(count)

    place_bombs(pid, coords)
  end

  @spec size(pid) :: pos_integer

      |> String.rstrip
      |> String.to_integer
    catch
      :error, :badarg -> {:error, :badarg}
    else
      row -> parse_coord(pid, {row, letter})
    end
