Space Walk board game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

57 lines
1.3 KiB

  1. /*
  2. * Rick van Vonderen
  3. * 0945444
  4. * TI2B
  5. *
  6. * Avoid repeated writing by using:
  7. * - functions with parameters (no globals) instead of almost identical pieces of code
  8. * - repetitive loops and arrays instead of identical activities
  9. * - constants instead of identical values
  10. *
  11. * Divide your program into modules and/or classes that:
  12. * - have an explicit, well-defined interface
  13. * - be as independent as possible
  14. * - to be developed and tested separately
  15. *
  16. * Make your code understandable for others by using:
  17. * - Clear names in camel case, only start class names with a capital letter, consistently indent
  18. * - Clear, concise commentary, only where this adds something
  19. * - Standard terminology from the customer's field or application
  20. *
  21. * ClassExample
  22. * variableExample
  23. * DEFINE_EXAMPLE
  24. */
  25. #include <cstring> // strcmp()
  26. #include <ncurses.h> // refresh()
  27. #include "gamestate.h"
  28. #include "inputoutput.h"
  29. #include "mainmenu.h"
  30. #include "test.h"
  31. GameStateManager gameStateManager;
  32. int main(int argc, char *argv[]) {
  33. #ifdef DEBUG
  34. // IO::print("DEBUG MODE ENABLED");
  35. refresh();
  36. GameState::sleep(1000);
  37. if (argc >= 2 && strcmp(argv[1], "-t") == 0) {
  38. Test();
  39. }
  40. #endif
  41. gameStateManager.setState(new MainMenu());
  42. while (!IO::getQuit()) {
  43. gameStateManager.render();
  44. gameStateManager.update();
  45. }
  46. return 0;
  47. }