Implementar sistema de auto-reinicio con temporizador de inactividad

- Añadir getter isStopped() en Ball para detectar pelotas quietas
- Sistema de temporizador de 5 segundos que detecta cuando todas las pelotas están paradas
- Auto-reinicio aleatorio cuando se cumple el tiempo de inactividad:
  * Escenario aleatorio usando test_.size() (1 a 100,000 pelotas)
  * Tema aleatorio usando sizeof(themes_) (5 temas disponibles)
  * Reset inteligente del temporizador si alguna pelota se mueve
- Integración no intrusiva en update() del bucle principal
- Usa infraestructura existente (SDL_GetTicks, initBalls, rand)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-27 22:21:30 +02:00
parent 7ac29f899b
commit 79964732ef
3 changed files with 55 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ class Ball {
float getLossCoefficient() const { return loss_; }
GravityDirection getGravityDirection() const { return gravity_direction_; }
bool isOnSurface() const { return on_surface_; }
bool isStopped() const { return stopped_; }
// Getters para batch rendering
SDL_FRect getPosition() const { return pos_; }