amethyst/apps/example_game/lib/example/game.ex
Kodi Craft 4a5ccc719d
Some checks failed
Build & Test / nix-build (push) Failing after 59s
Some significant refactoring progress
2024-08-28 14:52:13 +02:00

18 lines
421 B
Elixir

defmodule Example.Game do
require Logger
@behaviour Amethyst.API.Game
@impl true
def instantiate(supervisor) do
Logger.info("The supervisor for this game is at #{inspect(supervisor)}")
{:ok, %{}}
end
@impl true
def login(from, cfg, refs) do
Logger.info("Player logged in from #{inspect(from)}: #{inspect(cfg)}")
Logger.info("The refs for this game are #{inspect(refs)}")
:ok
end
end