70 lines
1.6 KiB
Python
70 lines
1.6 KiB
Python
import time as _time
|
|
import random as _rand
|
|
import main as _main
|
|
from entities import weapon_syms as _wsyms
|
|
|
|
def _debug_data():
|
|
players= [
|
|
{
|
|
'name': 'Elara',
|
|
},
|
|
{
|
|
'name': 'Kaelen',
|
|
},
|
|
{
|
|
'name': 'Zephyr',
|
|
},
|
|
{
|
|
'name': 'Lyra',
|
|
},
|
|
{
|
|
'name': 'Orion',
|
|
},
|
|
{
|
|
'name': 'Seraphina',
|
|
},
|
|
]
|
|
weapons= []
|
|
|
|
Arena= _main.init_arena(players, weapons)
|
|
print(f'Players: {Arena.get_players()}')
|
|
print(f'Weapons: {Arena.get_weapons()}')
|
|
return Arena
|
|
|
|
def _end_game_debug(alive_players, day):
|
|
last_player= alive_players[0]
|
|
print(f'{last_player.get_name()} sopravvive e vince dopo {day} lunghi Giorni, conquistando l\'amore eterno di Guarino')
|
|
|
|
def play_one_day_debug(Arena):
|
|
alive_players= Arena.get_alive_players()
|
|
if not Arena.get_players(): return
|
|
if len(alive_players) == 1:
|
|
day= Arena.day
|
|
return _end_game_debug(alive_players, day)
|
|
|
|
p_one, p_two= _rand.sample(alive_players, 2)
|
|
_dmg, msg= p_one.attack(p_two)
|
|
Arena.next_day()
|
|
print(f'Giorno #{Arena.day}')
|
|
return msg
|
|
|
|
def init_debug_loop():
|
|
Arena= _debug_data()
|
|
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
|
|
|
|
last_player= Arena.get_alive_players()[0]
|
|
print(f'{last_player.get_name()} sopravvive e vince dopo {Arena.day} lunghi Giorni, conquistando l\'amore eterno di Guarino')
|
|
|
|
if __name__ == '__main__':
|
|
init_debug()
|