package gltronic.tronio.model;

import java.time.Instant;
import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Component;
import org.springframework.web.socket.WebSocketSession;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Component
public class Game {
  private Map<String, Player> players;
  private Map<String, WebSocketSession> sessions;
  private GameSettings settings;
  private boolean updateNeeded;
  private Instant lastUpdate;

  public Game() {
    this.updateNeeded = false;
    this.lastUpdate = Instant.now();
    this.players = new HashMap<>();
    this.sessions = new HashMap<>();
    this.settings = new GameSettings();
  }
}