   @doc """
   Places a bomb on the board square at the given coordinate.
 
-  Returns `:ok` on success, or `{:error, :invalid_coord}` on failure.
-  """
-  @spec place_bomb(pid, coord) :: :ok | {:error, :invalid_coord}
+  Returns `:ok` on success, or `{:error, :badarg}` on failure.
+  """
+  @spec place_bomb(pid, coord) :: :ok | {:error, :badarg}
   def place_bomb(pid, coord) do
     place_bombs(pid, [coord])
   end

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

  def parse_coord(pid, {row, letter}) when is_binary(letter) do
    col = letter_to_col(letter)
    parse_coord(pid, {row, col})
  end

  def parse_coord(pid, {row, col}) do
    grid = get(pid).grid

    if Grid.valid_coord?(grid, {row, col}) do
      {:ok, {row, col}}
    else
      {:error, :invalid_coord}
    end
  end

  @spec letter_to_col(String.t) :: pos_integer
  defp letter_to_col(string) when byte_size(string) === 1 do
    normalized = String.downcase(string)
    [char] = normalized |> to_char_list

    char - ?a + 1
  end
  defp letter_to_col(_), do: {:error, :invalid_coord}

  # Reveal all the squares on a `board` for debugging.
  @doc false

      end)

    if any_errors? do
      {:error, :badarg}
    else
      parsed_coords
      |> Keyword.values
