Strategická: Zobrazení akce
This commit is contained in:
parent
a79fc82f20
commit
5e6e4a7afa
1 changed files with 18 additions and 2 deletions
|
@ -19,7 +19,7 @@ import hra.db as db
|
|||
from hra.web import app
|
||||
import hra.web.jinja_mac as jinja_mac
|
||||
from hra.util import hash_passwd
|
||||
from hra.web.pages import BasePage, web_game_view
|
||||
from hra.web.pages import BasePage, web_game_view, right_for_team
|
||||
|
||||
|
||||
wlogic_by_mode = {}
|
||||
|
@ -80,6 +80,18 @@ class Occupy(WLogic):
|
|||
q = db.get_session().query(db.Log).order_by(db.Log.log_id.desc())
|
||||
conff.validate()
|
||||
|
||||
moves = []
|
||||
|
||||
for t in teams:
|
||||
t_moves = {}
|
||||
if right_for_team(t):
|
||||
move = t.get_move(state.round).get_move()
|
||||
if move:
|
||||
for member in move["members"]:
|
||||
t_moves[member["id"]] = member["action"]
|
||||
moves.append(t_moves)
|
||||
|
||||
|
||||
max_num = 999 if conff.big_fields.data else 99
|
||||
|
||||
def reaming_time(id="time"):
|
||||
|
@ -179,7 +191,11 @@ class Occupy(WLogic):
|
|||
b.p().b(f"Počet osob: {len(members)}")
|
||||
with b.ul():
|
||||
for m in members:
|
||||
b.li(_class=f"game_team_{m['team']}")(f"Voják {m['id']} týmu {teams[m['team']].print()}")
|
||||
with b.li(_class=f"game_team_{m['team']}"):
|
||||
b(f"Voják {m['id']} týmu {teams[m['team']].print()}")
|
||||
if m['id'] in moves[m['team']]:
|
||||
action = moves[m['team']][m['id']]
|
||||
b(f"({action.upper()})")
|
||||
|
||||
b = BasePage()
|
||||
if not conff.show_data_only.data:
|
||||
|
|
Loading…
Reference in a new issue