|
|
@ -96,7 +96,7 @@ class Occupy(WLogic): |
|
|
|
else: |
|
|
|
b("Konec kola není stanoven") |
|
|
|
|
|
|
|
def status(): |
|
|
|
def status(position="left"): |
|
|
|
members_counts = [0 for _ in teams] |
|
|
|
occupied_counts = [0 for _ in teams] |
|
|
|
|
|
|
@ -109,21 +109,24 @@ class Occupy(WLogic): |
|
|
|
members_counts[occupied_by_team] += len(members) |
|
|
|
|
|
|
|
|
|
|
|
with b.div(_class="game_left_status button form-frame"): |
|
|
|
b.b("Kolo ", state.round) |
|
|
|
with b.p(): |
|
|
|
reaming_time(id="time_left") |
|
|
|
with b.p(): |
|
|
|
with b.div(_class=f"game_{position}_status button form-frame"): |
|
|
|
if position != "up": |
|
|
|
b.b("Kolo ", state.round) |
|
|
|
with b.p(): |
|
|
|
reaming_time(id="time_left") |
|
|
|
with b.p() if position == "left" else b.bucket(): |
|
|
|
for t, occupied_count, members_count in zip(teams, occupied_counts, members_counts): |
|
|
|
with b.line().span(_class=f"game_team_{t.team_id}"): |
|
|
|
b.b("Tým ", t.print()) |
|
|
|
b.br() |
|
|
|
b("Bodů: ", t.get_move(state.round).points) |
|
|
|
b.br() |
|
|
|
b("Políček: ", occupied_count) |
|
|
|
b.br() |
|
|
|
b("Vojáků: ", members_count) |
|
|
|
b.br() |
|
|
|
with b.p() if position == "up" else b.bucket(): |
|
|
|
with b.line().span(_class=f"game_team_{t.team_id}"): |
|
|
|
b.b("Tým ", t.print()) |
|
|
|
b.br() |
|
|
|
b("Bodů: ", t.get_move(state.round).points) |
|
|
|
b.br() |
|
|
|
b("Políček: ", occupied_count) |
|
|
|
b.br() |
|
|
|
b("Vojáků: ", members_count) |
|
|
|
b.br() |
|
|
|
b.div(style="clear: both")("") |
|
|
|
|
|
|
|
|
|
|
|
def table(): |
|
|
@ -185,15 +188,18 @@ class Occupy(WLogic): |
|
|
|
b.p("Po kliknutí na buňku se zobrazí další informace.") |
|
|
|
if conff.refresh.data == conff.refresh_meta and time_reaming is None: |
|
|
|
b.p(f"Není známo, kdy nastane další kolo, proto může být aktualizace až o {meta_refresh_without_reaming} sekund opožděna.") |
|
|
|
with b.p(): |
|
|
|
if team is not None: |
|
|
|
b.line().b(_class=f"game_team_{team.team_id}")(f"Pohled týmu {team.print()}") |
|
|
|
with b.p(): |
|
|
|
if team is not None: |
|
|
|
b.line().b(_class=f"game_team_{team.team_id}")(f"Pohled týmu {team.print()}") |
|
|
|
if not conff.show_data_only.data or conff.status.data == conff.status_up: |
|
|
|
with b.line().b(_class="pull-right"): |
|
|
|
reaming_time() |
|
|
|
if conff.status.data == conff.status_up: |
|
|
|
status("up") |
|
|
|
b.div(style="clear: both; margin-bottom: 1ex")("") |
|
|
|
with b.div().div(style="text-align:center;", id="game_main"): |
|
|
|
with b.div().div(id="game_main"): |
|
|
|
if conff.status.data == conff.status_left: |
|
|
|
status() |
|
|
|
status("left") |
|
|
|
table() |
|
|
|
if conff.clickable.data == conff.clickable_right: |
|
|
|
clickable() |
|
|
@ -224,8 +230,8 @@ class Occupy(WLogic): |
|
|
|
main_w = table_w + left_w |
|
|
|
if conff.clickable.data == conff.clickable_right: |
|
|
|
right_w = 400 |
|
|
|
main_w += right_w |
|
|
|
style += f".game_tab {{\n width: {right_w}px\n}}\n" |
|
|
|
main_w += right_w + 40 |
|
|
|
style += f".game_tab {{\n width: {right_w}px; margin-left: 10pt; \n}}\n" |
|
|
|
if main_w > page_w: |
|
|
|
margin_cmd = f"margin-left: {(page_w-main_w) / 2}px;" |
|
|
|
if conff.refresh.data == conff.refresh_meta: |
|
|
|