Files
mmintel f2650dc3be Cockpit and runner 5.11. late: no ESC stop, hidden tables stay open, gapless tiling, teacher core
- ESC no longer triggers the emergency stop (an ESC in another app stopped the run at 20:29);
  stopping only via ctrl-opt-cmd-S or the stop button
- a table whose program runs counts as open even when its window is not visible (other
  desktop, Cockpit without screen recording): no reopening, no giving up, correct table
  count; teardown and closing a full table work over the channel
- Cockpit checks and requests the screen recording permission
- gapless tiling (sicht/kacheln.py): tables fill the full height, the Cockpit bar takes the
  rest and never goes below its minimum width; own animated resize no longer stored as minimum
- earlier today: top-up safety net, leave after the hand (sit out next hand), tournament lock,
  waitlist left on close, Cockpit start lock, warning throttle, preflop raise-war reading,
  Bomb Pot practice, tournament break and level-up on the stage
- teacher core for the streamer mode (betrieb/lehrer.py, betrieb/grund_lesen.py) and its plan
2026-11-05 22:39:41 +01:00

25 lines
1.4 KiB
Python

"""Einen einzelnen Tisch verlassen, ohne eine Hand zu verschenken - die reinen Regeln.
Der Laeufer (betrieb/runner.py) meldet an einem Tisch, den er verlassen will (Verlustdeckel,
kleiner Stapel, Ratholing, vergebliches "zurueck"), zuerst "naechste Hand aussetzen" an
(`tischkanal.naechste_hand_aussetzen`), spielt die laufende Hand zu Ende und steht erst auf, wenn
der Platz ausgesetzt ist - oder die Frist um. Dazu der Notausgang fuer einen Nachkauf, der nicht
wirkt. Pruefung: tests/abgang_nach_der_hand_spec.py.
"""
FRIST_S = 120.0 # so lange darf eine laufende Hand dauern, dann geht er trotzdem
NACHKAUF_FRIST_S = 120.0 # ein Nachkauf mitten in der Hand gilt erst nach ihr ("Topup Pending")
def reif(seit, jetzt, ausgesetzt, kanal):
"""Darf er jetzt aufstehen? Der Platz ist schon ausgesetzt (nichts mehr zu Ende zu spielen),
es gibt keinen Kanal (also auch kein "naechste Hand aussetzen"), oder die angemeldete
Hand (`seit`) dauert laenger als die Frist."""
return ausgesetzt or not kanal or (seit is not None and jetzt - seit > FRIST_S)
def nachkauf_gescheitert(seit, jetzt, stack, bb, aufstehen_bb):
"""Wirkt der Nachkauf nicht? Seit `seit` angefordert, die Frist ist um, und der Stapel liegt
noch unter `aufstehen_bb` Big Blinds - dann lieber ein neuer Tisch mit vollem Buy-in."""
return seit is not None and jetzt - seit > NACHKAUF_FRIST_S and stack < aufstehen_bb * bb