GlobalController.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. package ui.controller;
  2. import ui.model.Model;
  3. public class GlobalController {
  4. private Model MODEL;
  5. public GlobalController(Model model) {
  6. this.MODEL = model;
  7. }
  8. /**
  9. * Returns SCALE
  10. *
  11. * @return SCALE
  12. */
  13. public int getScale() {
  14. return MODEL.getScale();
  15. }
  16. /**
  17. * Returns SCALE Divided by 2
  18. *
  19. * @return SCALE Divided by 2
  20. */
  21. public int getScaleDiv2() {
  22. return MODEL.getScaleDiv2();
  23. }
  24. /**
  25. * Changes the value of SCALE and SCALEDIV2
  26. *
  27. * @param int
  28. * Scale
  29. */
  30. public void setScale(int s) {
  31. MODEL.setScale(s);
  32. }
  33. /**
  34. * sets the current Iteration
  35. *
  36. * @param cur_it,
  37. * the current Iteration
  38. */
  39. public void setCurIteration(int cur_it) {
  40. MODEL.setCurIteration(cur_it);
  41. }
  42. /**
  43. * Returns numberOfSaves
  44. *
  45. * @return numberOfSaves
  46. */
  47. public int getNumbersOfSaves() {
  48. return MODEL.getNumberOfSaves();
  49. }
  50. /**
  51. * sets the max number of autosaves
  52. *
  53. * @param numberOfSaves,
  54. * the max number of autosaves
  55. */
  56. public void setNumberOfSaves(int numberOfSaves) {
  57. MODEL.setNumberOfSaves(numberOfSaves);
  58. ;
  59. }
  60. /**
  61. * @return sets the timerSpeed
  62. */
  63. public void setTimerSpeed(int t) {
  64. MODEL.setTimerSpeed(t);
  65. }
  66. /**
  67. * @param isSimulation
  68. * boolean for for isSimulation
  69. */
  70. public void setIsSimulation(boolean b) {
  71. MODEL.setIsSimulation(b);
  72. }
  73. }