Created
December 10, 2016 23:46
-
-
Save landongn/fbbbdbc25f6523eaa471442bdc43c935 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require Logger | |
alias Server.Repo | |
alias Server.Character | |
defmodule Server.World do | |
@online %{} | |
def join(character) do | |
online = Map.put @online, character.id, character | |
Logger.info "character #{inspect character.name} has come online" | |
end | |
def round(cid, mid) do | |
#fight! | |
end | |
def win(cid, mid) do | |
#you win | |
end | |
def lose(cid, mid) do | |
#you died :( | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment