123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- package ui.controller;
- import ui.model.Model;
- /**
- * Controller for the Global Variables.
- *
- * @author Gruppe14
- */
- public class GlobalController {
- private Model model;
- /**
- * Constructor.
- *
- * @param model
- * the Model
- */
- public GlobalController(Model model) {
- this.model = model;
- }
- /**
- * Returns SCALE.
- *
- * @return SCALE
- */
- public int getScale() {
- return model.getScale();
- }
- /**
- * Returns SCALE Divided by 2.
- *
- * @return SCALE Divided by 2
- */
- public int getScaleDiv2() {
- return model.getScaleDiv2();
- }
- /**
- * Changes the value of SCALE and SCALEDIV2.
- *
- * @param s
- * Scale
- */
- public void setScale(int s) {
- model.setScale(s);
- }
- /**
- * sets the current Iteration.
- *
- * @param curit
- * the current Iteration
- */
- public void setCurIteration(int curit) {
- model.setCurIteration(curit);
- }
- /**
- * Returns numberOfSaves.
- *
- * @return numberOfSaves
- */
- public int getNumbersOfSaves() {
- return model.getNumberOfSaves();
- }
- /**
- * sets the max number of autosaves.
- *
- * @param numberofSaves
- * the max number of autosaves
- */
- public void setNumberOfSaves(int numberofSaves) {
- model.setNumberOfSaves(numberofSaves);
- ;
- }
- /**
- * Set the timerSpeed.
- * @param t
- * Interval in ms
- */
- public void setTimerSpeed(int t) {
- model.setTimerSpeed(t);
- }
- /**
- * Set isSimulation.
- *
- * @param b
- * boolean for for isSimulation
- */
- public void setIsSimulation(boolean b) {
- model.setIsSimulation(b);
- }
- }
|