Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include "helpmessage.cc"
- using namespace std;
- int main(int argc, char const *argv[]) {
- for (int i = 1; i <= argc; i++) { //COMMAND LINE ARGUMENTS
- string command = argv[i];
- if (command == "-deck1") {
- string filename = argv[i++];
- cout << "deck1" << filename << endl; //temp, to be implemented
- continue;
- } else if (command == "-deck2") {
- string filename = argv[i++];
- cout << "deck2" << filename << endl; //temp
- continue;
- } else if (command == "-init") {
- string filename = argv[i++];
- cout << "init" << filename << endl; //temp
- continue;
- } else if (command == "-testing") {
- #define _TESTING_
- continue;
- } else if (command == "-graphics") {
- cout << "are we really going to get this far" << endl; //temp, of course
- }
- }// COMMAND LINE ARGUMENTS
- bool ongoing = true;
- while (ongoing) {
- string command;
- cin >> command;
- if (command == "help") {
- printHelp();
- } else if (command == "end") {
- cout << "end" << endl; //echo
- } else if (command == "attack") {
- cout << "attack" << endl; //echo
- } else if (command == "use") {
- cout << "use" << endl; //echo
- } else if (command == "describe") {
- cout << "describe" << endl; //echo
- } else if (command == "hand") {
- cout << "hand" << endl; // echo
- } else if (command == "board") {
- cout << "board" << endl; // echo
- }
- // -testing flag
- #ifdef _TESTING_
- else if (command == "draw") {
- cout << "draw" << endl; // echo
- } else if (command == "discard") {
- cout << "discard" << endl; // echo
- }
- #endif
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement