From bb396ae8d3f40d6429eb41a1b2df314a9687d4f802986511b87ab05722a3874f Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 23 Jul 2025 21:22:34 +0200 Subject: [PATCH] other player methods --- entities/player.py | 11 +++++++++++ main.py | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/entities/player.py b/entities/player.py index fb46faa..9df3c2a 100644 --- a/entities/player.py +++ b/entities/player.py @@ -18,3 +18,14 @@ class BrSimPlayer(): rnd= _random.randint(0, 100) if rnd > self.agility: return True return False + + def steal(self): + #XXX can steal from death players or from sleeping players + pass + + def heal(self): + #XXX if you have a wound and you have a medikit item, you can heal your wound or sickness + pass + + def get_inventory(self): + return self.inventory diff --git a/main.py b/main.py index dd65c9a..161f73d 100644 --- a/main.py +++ b/main.py @@ -41,7 +41,8 @@ class BrSimArena(): def init_arena(): players= [{'name': 'Crystal'}, {'name': 'Andrea'}] - weapons= [{_wsyms.KNIFE['name']: 1}] + w= _wsyms.KNIFE + weapons= [{_wsyms.WEAPONS[w]['name']: 1}] return BrSimArena(players, weapons)