package thb.jeanluc.adventure.game;

import lombok.Getter;
import thb.jeanluc.adventure.model.Player;
import thb.jeanluc.adventure.model.World;

/**
 * Bundle of the mutable, savable game state for one playthrough: the
 * loaded {@link World}, the {@link Player}, world {@link GameState} flags,
 * {@link QuestLog} progress, the turn counter, and the bound save-slot name.
 * Save/load read and write exactly this object.
 */
@Getter
public class GameSession {

    private final World world;
    private final Player player;
    private final GameState state = new GameState();
    private final QuestLog questLog = new QuestLog();
    private final String slotName;
    private int turn;

    public GameSession(World world, Player player, String slotName) {
        this.world = world;
        this.player = player;
        this.slotName = slotName;
    }

    public void setTurn(int turn) {
        this.turn = turn;
    }

    public void incrementTurn() {
        this.turn++;
    }
}
