GlobalController.java 1.6 KB

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