Пример #1
0
    def _init_game(self):
        self.close()

        game = vd.DoomGame()
        game = player_setup(game, self.cfg)
        if self.cfg.is_multiplayer_game:
            if self.cfg.host_cfg is not None:
                game = player_host_setup(game, self.cfg.host_cfg)
            elif self.cfg.join_cfg is not None:
                game = player_join_setup(game, self.cfg.join_cfg)
            else:
                raise ValueError('neither host nor join, error!')
        game.init()
        self.game = game
        self._game_var_list = self.game.get_available_game_variables()
        self._update_vars()
Пример #2
0
    def _init_game(self):
        self.close()

        game = vd.DoomGame()
        game = player_setup(game, self.cfg)

        if self.cfg.is_multiplayer_game:
            if self.cfg.host_cfg is not None:
                game = player_host_setup(game, self.cfg.host_cfg)
            elif self.cfg.join_cfg is not None:
                game = player_join_setup(game, self.cfg.join_cfg)
            else:
                raise ValueError('neither host nor join, error!')

        game.init()
        self.game = game
Пример #3
0
def _get_available_game_variables_dim(player_cfg):
    g = vd.DoomGame()
    g = player_setup(g, player_cfg)
    return len(g.get_available_game_variables())
Пример #4
0
def _get_action_dim(player_cfg):
    g = vd.DoomGame()
    g = player_setup(g, player_cfg)
    return len(g.get_available_buttons())