package gltronic.tronio.model;

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;

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

    this.settings.setArenaSize(1000);
    this.settings.setPlayerSize(10);
    this.settings.setPlayerSpeed(2);
    this.settings.setPlayerTurnSpeed(10);
    this.settings.setWallSize(8);
    this.settings.setWallUpdate(5);
  }
}