timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
45 stars 11 forks source link

feat: ignore player practice till next admin-started game #166

Open timotheeg opened 5 months ago

timotheeg commented 5 months ago

Context

NTC layouts always show the real time data of the players, and compute the real time score differential between 2 players.

If after dying a player plays practice games, his last death score is reset, to be set to the current game score. And that messes up the score differential.

Goal

The Game 5s count down now represents admin sanctionned games. Once a player dies, none of the latest game frame should affect the layouts till the admin starts the next officially sanctionned game (by triggering the next count down)

Approach

The approach currently is a disgusting hack!!!

The player class intercepts new-game events, and prevents them to update the ui if the game is not in admin_only_pending_game "mode"