forked from Cryz/battle_royale_sim
show map with players on telegram bot
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from entities import player as _player
|
||||
from entities import event_picker as _events
|
||||
from entities import gamemap as _map
|
||||
from entities.items import weapons as _weapons
|
||||
|
||||
class BrSimArena():
|
||||
@@ -14,6 +15,7 @@ class BrSimArena():
|
||||
self.eventClass = _events.ArenaEventPicker(self.players)
|
||||
self.init_players(players)
|
||||
self.init_weapons(weapons)
|
||||
self.Map= _map.BrSimMap(self.players, self.weapons)
|
||||
|
||||
def init_players(self, players):
|
||||
if not players: return
|
||||
@@ -110,10 +112,12 @@ class BrSimArena():
|
||||
def add_player(self, name, inventory= None):
|
||||
player= _player.BrSimPlayer(name, inventory)
|
||||
self.players.append(player)
|
||||
self.Map.add_player_to_map(player)
|
||||
|
||||
def add_weapon(self, weapon_type):
|
||||
weapon= _weapons.BrSimWeapon(weapon_type)
|
||||
self.weapons.append(weapon)
|
||||
self.Map.add_item_to_map(item)
|
||||
|
||||
def get_players(self):
|
||||
return self.players
|
||||
@@ -124,3 +128,6 @@ class BrSimArena():
|
||||
#XXX implement me
|
||||
res.append(w)
|
||||
return res
|
||||
|
||||
def get_map(self):
|
||||
return self.Map
|
||||
|
||||
Reference in New Issue
Block a user