summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2017-11-22 16:45:05 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2017-11-22 16:45:05 +0100 |
commit | 9dd67cd5c63ac2a050a517c313f2e343f008421b (patch) | |
tree | 44d774f751b82cb09996625c3eb2c9aaecb1330f /src/database_shim.erl | |
parent | 15515f36d7bbd53c7049c597ea2c6f942dc39ded (diff) |
Got the player turns to work... I think.
Diffstat (limited to 'src/database_shim.erl')
-rw-r--r-- | src/database_shim.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/database_shim.erl b/src/database_shim.erl index 0a46c00..8d97298 100644 --- a/src/database_shim.erl +++ b/src/database_shim.erl @@ -53,8 +53,19 @@ generate_map_instance (CharInts) -> { id = <<"0">>, chars = dict:from_list(CharInts), - curr_player = <<"0">>, - rem_chars = [], + curr_player = 0, + players = array:from_list([<<"0">>, <<"1">>]), + rem_chars = + lists:filtermap + ( + fun ({K, V}) -> + case character_instance:get_owner(V) of + 0 -> {true, K}; + _ -> false + end + end, + CharInts + ), last_turn = [] }. |