summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/battlemap/reply')
-rw-r--r-- | src/battlemap/reply/bm_add_armor.erl | 34 | ||||
-rw-r--r-- | src/battlemap/reply/bm_add_char.erl | 83 | ||||
-rw-r--r-- | src/battlemap/reply/bm_add_tile.erl | 30 | ||||
-rw-r--r-- | src/battlemap/reply/bm_add_weapon.erl | 54 | ||||
-rw-r--r-- | src/battlemap/reply/bm_set_map.erl | 31 | ||||
-rw-r--r-- | src/battlemap/reply/bm_set_timeline.erl | 27 | ||||
-rw-r--r-- | src/battlemap/reply/bm_turn_results.erl | 27 |
7 files changed, 0 insertions, 286 deletions
diff --git a/src/battlemap/reply/bm_add_armor.erl b/src/battlemap/reply/bm_add_armor.erl deleted file mode 100644 index 4f098bd..0000000 --- a/src/battlemap/reply/bm_add_armor.erl +++ /dev/null @@ -1,34 +0,0 @@ --module(bm_add_armor). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/1]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec encode_category (sh_armor:category()) -> binary(). -encode_category (kinetic) -> <<"k">>; -encode_category (leather) -> <<"l">>; -encode_category (chain) -> <<"c">>; -encode_category (plate) -> <<"p">>. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate (sh_armor:type()) -> {list(any())}. -generate (Armor) -> - { - [ - {<<"msg">>, <<"add_armor">>}, - {<<"id">>, sh_armor:get_id(Armor)}, - {<<"nam">>, sh_armor:get_name(Armor)}, - {<<"ct">>, encode_category(sh_armor:get_category(Armor))}, - {<<"cf">>, sh_armor:get_coefficient(Armor)} - ] - }. diff --git a/src/battlemap/reply/bm_add_char.erl b/src/battlemap/reply/bm_add_char.erl deleted file mode 100644 index 4dab700..0000000 --- a/src/battlemap/reply/bm_add_char.erl +++ /dev/null @@ -1,83 +0,0 @@ --module(bm_add_char). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/3]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec rank_to_string (bm_character:rank()) -> binary(). -rank_to_string (Rank) -> - case Rank of - optional -> <<"o">>; - target -> <<"t">>; - commander -> <<"c">> - end. - --spec attributes_as_json - ( - sh_attributes:type() - ) -> - {list({binary(), non_neg_integer()})}. -attributes_as_json (Attributes) -> - { - [ - {<<"con">>, sh_attributes:get_constitution(Attributes)}, - {<<"dex">>, sh_attributes:get_dexterity(Attributes)}, - {<<"int">>, sh_attributes:get_intelligence(Attributes)}, - {<<"min">>, sh_attributes:get_mind(Attributes)}, - {<<"spe">>, sh_attributes:get_speed(Attributes)}, - {<<"str">>, sh_attributes:get_strength(Attributes)} - ] - }. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate - ( - non_neg_integer(), - bm_character:type(), - non_neg_integer() - ) - -> {list(any())}. -generate (IX, Character, PlayerIX) -> - Attributes = bm_character:get_attributes(Character), - {ActiveWeapon, SecondaryWeapon} = bm_character:get_weapon_ids(Character), - CharacterPlayerIX = bm_character:get_player_index(Character), - Location = bm_character:get_location(Character), - - { - [ - {<<"msg">>, <<"add_char">>}, - {<<"ix">>, IX}, - {<<"nam">>, bm_character:get_name(Character)}, - {<<"rnk">>, rank_to_string(bm_character:get_rank(Character))}, - {<<"ico">>, bm_character:get_icon(Character)}, - {<<"prt">>, bm_character:get_portrait(Character)}, - { - <<"hea">>, - bm_character:get_current_health(Character) - }, - {<<"lc">>, bm_location:encode(Location)}, - {<<"pla">>, CharacterPlayerIX}, - { - <<"ena">>, - ( - bm_character:get_is_active(Character) - and (CharacterPlayerIX == PlayerIX) - ) - }, - {<<"dea">>, bm_character:get_is_defeated(Character)}, - {<<"att">>, attributes_as_json(Attributes)}, - {<<"awp">>, ActiveWeapon}, - {<<"swp">>, SecondaryWeapon}, - {<<"ar">>, bm_character:get_armor_id(Character)} - ] - }. diff --git a/src/battlemap/reply/bm_add_tile.erl b/src/battlemap/reply/bm_add_tile.erl deleted file mode 100644 index 1845ffc..0000000 --- a/src/battlemap/reply/bm_add_tile.erl +++ /dev/null @@ -1,30 +0,0 @@ --module(bm_add_tile). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/1]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate (bm_tile:type()) -> {list(any())}. -generate (Tile) -> - { - [ - {<<"msg">>, <<"add_tile">>}, - {<<"id">>, bm_tile:get_id(Tile)}, - {<<"nam">>, bm_tile:get_name(Tile)}, - {<<"ct">>, bm_tile:get_cost(Tile)}, - {<<"rmi">>, bm_tile:get_range_minimum(Tile)}, - {<<"rma">>, bm_tile:get_range_maximum(Tile)} - ] - }. diff --git a/src/battlemap/reply/bm_add_weapon.erl b/src/battlemap/reply/bm_add_weapon.erl deleted file mode 100644 index 3473265..0000000 --- a/src/battlemap/reply/bm_add_weapon.erl +++ /dev/null @@ -1,54 +0,0 @@ --module(bm_add_weapon). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/1]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec encode_range_type (sh_weapon:range_type()) -> binary(). -encode_range_type (melee) -> <<"m">>; -encode_range_type (ranged) -> <<"r">>. - --spec encode_range_modifier (sh_weapon:range_modifier()) -> binary(). -encode_range_modifier (long) -> <<"l">>; -encode_range_modifier (short) -> <<"s">>. - --spec encode_damage_type (sh_weapon:damage_type()) -> binary(). -encode_damage_type (slash) -> <<"s">>; -encode_damage_type (pierce) -> <<"p">>; -encode_damage_type (blunt) -> <<"b">>. - --spec encode_damage_modifier (sh_weapon:damage_modifier()) -> binary(). -encode_damage_modifier (heavy) -> <<"h">>; -encode_damage_modifier (light) -> <<"l">>. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate (sh_weapon:type()) -> {list(any())}. -generate (Weapon) -> - { - [ - {<<"msg">>, <<"add_weapon">>}, - {<<"id">>, sh_weapon:get_id(Weapon)}, - {<<"nam">>, sh_weapon:get_name(Weapon)}, - {<<"rt">>, encode_range_type(sh_weapon:get_range_type(Weapon))}, - { - <<"rm">>, - encode_range_modifier(sh_weapon:get_range_modifier(Weapon)) - }, - {<<"dt">>, encode_damage_type(sh_weapon:get_damage_type(Weapon))}, - { - <<"dm">>, - encode_damage_modifier(sh_weapon:get_damage_modifier(Weapon)) - }, - {<<"cf">>, sh_weapon:get_coefficient(Weapon)} - ] - }. diff --git a/src/battlemap/reply/bm_set_map.erl b/src/battlemap/reply/bm_set_map.erl deleted file mode 100644 index 9989fa0..0000000 --- a/src/battlemap/reply/bm_set_map.erl +++ /dev/null @@ -1,31 +0,0 @@ --module(bm_set_map). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/1]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate (bm_battlemap:type()) -> {list(any())}. -generate (Battlemap) -> - { - [ - {<<"msg">>, <<"set_map">>}, - {<<"w">>, bm_battlemap:get_width(Battlemap)}, - {<<"h">>, bm_battlemap:get_height(Battlemap)}, - { - <<"t">>, - array:sparse_to_list(bm_battlemap:get_tile_class_ids(Battlemap)) - } - ] - }. diff --git a/src/battlemap/reply/bm_set_timeline.erl b/src/battlemap/reply/bm_set_timeline.erl deleted file mode 100644 index cea3790..0000000 --- a/src/battlemap/reply/bm_set_timeline.erl +++ /dev/null @@ -1,27 +0,0 @@ --module(bm_set_timeline). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/1]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate (list(any())) -> {list(any())}. -generate (EncodedClientUpdate) -> - io:format("~nSending timeline:~n~p~n", [EncodedClientUpdate]), - { - [ - {<<"msg">>, <<"set_timeline">>}, - {<<"cnt">>, EncodedClientUpdate} - ] - }. diff --git a/src/battlemap/reply/bm_turn_results.erl b/src/battlemap/reply/bm_turn_results.erl deleted file mode 100644 index d47a693..0000000 --- a/src/battlemap/reply/bm_turn_results.erl +++ /dev/null @@ -1,27 +0,0 @@ --module(bm_turn_results). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([generate/1]). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec generate (list(any())) -> {list(any())}. -generate (EncodedClientUpdate) -> - io:format("~nSending turn results:~n~p~n", [EncodedClientUpdate]), - { - [ - {<<"msg">>, <<"turn_results">>}, - {<<"cnt">>, EncodedClientUpdate} - ] - }. |