Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "helpmessage.cc"
  4. using namespace std;
  5.  
  6. int main(int argc, char const *argv[]) {
  7.  
  8.  
  9. for (int i = 1; i <= argc; i++) { //COMMAND LINE ARGUMENTS
  10. string command = argv[i];
  11. if (command == "-deck1") {
  12. string filename = argv[i++];
  13. cout << "deck1" << filename << endl; //temp, to be implemented
  14. continue;
  15. } else if (command == "-deck2") {
  16. string filename = argv[i++];
  17. cout << "deck2" << filename << endl; //temp
  18. continue;
  19. } else if (command == "-init") {
  20. string filename = argv[i++];
  21. cout << "init" << filename << endl; //temp
  22. continue;
  23. } else if (command == "-testing") {
  24. #define _TESTING_
  25. continue;
  26. } else if (command == "-graphics") {
  27. cout << "are we really going to get this far" << endl; //temp, of course
  28. }
  29. }// COMMAND LINE ARGUMENTS
  30.  
  31. bool ongoing = true;
  32.  
  33. while (ongoing) {
  34. string command;
  35. cin >> command;
  36. if (command == "help") {
  37. printHelp();
  38. } else if (command == "end") {
  39. cout << "end" << endl; //echo
  40. } else if (command == "attack") {
  41. cout << "attack" << endl; //echo
  42. } else if (command == "use") {
  43. cout << "use" << endl; //echo
  44. } else if (command == "describe") {
  45. cout << "describe" << endl; //echo
  46. } else if (command == "hand") {
  47. cout << "hand" << endl; // echo
  48. } else if (command == "board") {
  49. cout << "board" << endl; // echo
  50. }
  51.  
  52. // -testing flag
  53. #ifdef _TESTING_
  54. else if (command == "draw") {
  55. cout << "draw" << endl; // echo
  56. } else if (command == "discard") {
  57. cout << "discard" << endl; // echo
  58. }
  59. #endif
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement