forked from Cryz/battle_royale_sim
basic player entity and debug module to quickly test player attack
This commit is contained in:
38
debug.py
Normal file
38
debug.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import time as _time
|
||||
import random as _rand
|
||||
import main as _main
|
||||
from entities import weapon_syms as _wsyms
|
||||
|
||||
def init_debug():
|
||||
players= [
|
||||
{
|
||||
'name': 'Elara',
|
||||
},
|
||||
{
|
||||
'name': 'Kaelen',
|
||||
},
|
||||
{
|
||||
'name': 'Zephyr',
|
||||
}
|
||||
]
|
||||
w= _wsyms.KNIFE
|
||||
#weapons= [{_wsyms.WEAPONS[w]['name' ]: 1}]
|
||||
weapons= [{w: 1}]
|
||||
|
||||
Arena= _main.init_arena(players, weapons)
|
||||
print(f'Players: {Arena.get_players()}')
|
||||
print(f'Weapons: {Arena.get_weapons()}')
|
||||
while (len(Arena.get_alive_players()) > 1):
|
||||
alive_players= Arena.get_alive_players()
|
||||
|
||||
p_one, p_two= _rand.sample(alive_players, 2)
|
||||
p_one.attack(p_two)
|
||||
|
||||
#Start a day
|
||||
#At 23:59:
|
||||
Arena.next_day()
|
||||
_time.sleep(0.3)
|
||||
#End of day
|
||||
|
||||
if __name__ == '__main__':
|
||||
init_debug()
|
||||
Reference in New Issue
Block a user