| summaryrefslogtreecommitdiff | 
diff options
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 = []     }. | 


