     "game:" <> id = socket.topic
     game = Game.get(id)
 
-    HTTPoison.start
+    Api.start
 
     spawn fn ->
       game = Game.reset_world game

  end

  def make_move world do
    payload = Poison.encode! world

    moves = for snake <- world.snakes do
      name = snake.name
      url = snake.url <> "/move"
      headers = [{"content-type", "application/json"}]

      response = HTTPoison.post!(url, payload, headers)
      body = Poison.decode!(response.body)
      %{"move" => move} = body
      {name, move}
    end

    moves = Enum.into moves, %{}

    Snake,
    World,
  }

  alias BattleSnakeServer.{
    Game,
    Snake.Api
  }

  use BattleSnakeServer.Web, :channel

  def join("game:" <> game_id, payload, socket) do
