# Path: meltingpot/python/configs/substrates/collaborative_cooking_impassable.py
# def get_config():
# 
# Path: meltingpot/python/configs/substrates/collaborative_cooking_passable.py
# def get_config():
# 
# Path: meltingpot/python/human_players/level_playing_utils.py
# WHITE = (255, 255, 255)
# MOVEMENT_MAP = {
#     'NONE': 0,
#     'FORWARD': 1,
#     'RIGHT': 2,
#     'BACKWARD': 3,
#     'LEFT': 4,
# }
#   NONE = 0
#   PYGAME = 1
# class RenderType(enum.Enum):
# class ActionReader(object):
# def get_random_direction() -> int:
# def get_random_turn() -> int:
# def get_random_fire() -> int:
# def get_direction_pressed() -> int:
# def get_turn_pressed() -> int:
# def get_space_key_pressed() -> int:
# def get_key_number_pressed() -> int:
# def get_key_number_one_pressed() -> int:
# def get_key_number_two_pressed() -> int:
# def get_key_number_three_pressed() -> int:
# def get_key_number_four_pressed() -> int:
# def get_key_number_five_pressed() -> int:
# def get_left_control_pressed() -> int:
# def get_left_shift_pressed() -> int:
# def get_right_shift_pressed() -> int:
# def get_key_z_pressed() -> int:
# def get_key_x_pressed() -> int:
# def _split_key(key: str) -> Tuple[int, str]:
# def _get_rewards(timestep: dm_env.TimeStep) -> Sequence[float]:
#   def __init__(self, env: dmlab2d.Environment, action_map: ActionMap):
#   def step(self, player_index: int) -> Sequence[Sequence[Mapping[str, int]]]:
# def run_episode(
#     render_observation: str,
#     config_overrides: Dict[str, Any],
#     action_map: ActionMap,
#     full_config: config_dict.ConfigDict,
#     interactive: RenderType = RenderType.PYGAME,
#     screen_width: int = 800,
#     screen_height: int = 600,
#     fps: int = 8,
#     verbose_fn: Optional[Callable[[dm_env.TimeStep, int], None]] = None,
#     text_display_fn: Optional[Callable[[dm_env.TimeStep, int], str]] = None,
#     text_font_size: int = 36,
#     text_x_pos: int = 20,
#     text_y_pos: int = 20,
#     text_color: Tuple[int, ...] = WHITE,
#     env_builder: EnvBuilder = builder.builder,
#     print_events: Optional[bool] = False,
#     ) -> None:


import argparse
import json
from meltingpot.python.configs.substrates import collaborative_cooking_impassable as mp_collaborative_cooking_impassable
from meltingpot.python.configs.substrates import collaborative_cooking_passable as mp_collaborative_cooking_passable
from meltingpot.python.human_players import level_playing_utils
# Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A simple human player for testing the `collaborative_cooking` level.

Use `WASD` keys to move the character around.
Use `Q and E` to turn the character.
Use `SPACE` to use the interact action.
Use `TAB` to switch between players.
"""




environment_configs = {
    'mp_collaborative_cooking_impassable': mp_collaborative_cooking_impassable,
    'mp_collaborative_cooking_passable': mp_collaborative_cooking_passable,
}

_ACTION_MAP = {

# Path: meltingpot/python/configs/substrates/collaborative_cooking_impassable.py
# def get_config():
# 
# Path: meltingpot/python/configs/substrates/collaborative_cooking_passable.py
# def get_config():
# 
# Path: meltingpot/python/human_players/level_playing_utils.py
# WHITE = (255, 255, 255)
# MOVEMENT_MAP = {
#     'NONE': 0,
#     'FORWARD': 1,
#     'RIGHT': 2,
#     'BACKWARD': 3,
#     'LEFT': 4,
# }
#   NONE = 0
#   PYGAME = 1
# class RenderType(enum.Enum):
# class ActionReader(object):
# def get_random_direction() -> int:
# def get_random_turn() -> int:
# def get_random_fire() -> int:
# def get_direction_pressed() -> int:
# def get_turn_pressed() -> int:
# def get_space_key_pressed() -> int:
# def get_key_number_pressed() -> int:
# def get_key_number_one_pressed() -> int:
# def get_key_number_two_pressed() -> int:
# def get_key_number_three_pressed() -> int:
# def get_key_number_four_pressed() -> int:
# def get_key_number_five_pressed() -> int:
# def get_left_control_pressed() -> int:
# def get_left_shift_pressed() -> int:
# def get_right_shift_pressed() -> int:
# def get_key_z_pressed() -> int:
# def get_key_x_pressed() -> int:
# def _split_key(key: str) -> Tuple[int, str]:
# def _get_rewards(timestep: dm_env.TimeStep) -> Sequence[float]:
#   def __init__(self, env: dmlab2d.Environment, action_map: ActionMap):
#   def step(self, player_index: int) -> Sequence[Sequence[Mapping[str, int]]]:
# def run_episode(
#     render_observation: str,
#     config_overrides: Dict[str, Any],
#     action_map: ActionMap,
#     full_config: config_dict.ConfigDict,
#     interactive: RenderType = RenderType.PYGAME,
#     screen_width: int = 800,
#     screen_height: int = 600,
#     fps: int = 8,
#     verbose_fn: Optional[Callable[[dm_env.TimeStep, int], None]] = None,
#     text_display_fn: Optional[Callable[[dm_env.TimeStep, int], str]] = None,
#     text_font_size: int = 36,
#     text_x_pos: int = 20,
#     text_y_pos: int = 20,
#     text_color: Tuple[int, ...] = WHITE,
#     env_builder: EnvBuilder = builder.builder,
#     print_events: Optional[bool] = False,
#     ) -> None:


# Path: meltingpot/python/human_players/play_collaborative_cooking.py
import argparse
import json
from meltingpot.python.configs.substrates import collaborative_cooking_impassable as mp_collaborative_cooking_impassable
from meltingpot.python.configs.substrates import collaborative_cooking_passable as mp_collaborative_cooking_passable
from meltingpot.python.human_players import level_playing_utils

# Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A simple human player for testing the `collaborative_cooking` level.

Use `WASD` keys to move the character around.
Use `Q and E` to turn the character.
Use `SPACE` to use the interact action.
Use `TAB` to switch between players.
"""




environment_configs = {
    'mp_collaborative_cooking_impassable': mp_collaborative_cooking_impassable,
    'mp_collaborative_cooking_passable': mp_collaborative_cooking_passable,
}

_ACTION_MAP = {

    'move': level_playing_utils.get_direction_pressed,