package cz.jzitnik.game.logic.services.daytime;

import cz.jzitnik.game.Game;
import cz.jzitnik.game.annotations.CustomLogic;
import cz.jzitnik.game.logic.CustomLogicInterface;
import cz.jzitnik.tui.ScreenRenderer;

@CustomLogic
public class DayTimeLogic implements CustomLogicInterface {
	@Override
	public void nextIteration(Game game, ScreenRenderer ignored) {
        int time = game.getDaytime();
        
        if (time >= 600) {
            game.setDaytime(0);
        } else {
            game.setDaytime(time + 1);
        }
	}
}
