#include "testMenu.h"

TestMenu::TestMenu(void* h) {
    handle = h;
    name = "TestMenu";
}

TestMenu::~TestMenu() {
    std::cout << "TestMenu Destroyed!\n";
}

void TestMenu::run() {
    
    std::cout << "Your number is: " << num << "\n"
              << "1. Add 1\n"
              << "2. Subtract 1\n"
              << "3. Unload Module\n\n"
              << "4. Quit\n\n";

    std::cin >> choice;

    switch(choice) {
        case 1:
            num++;
            break;
        case 2:
            num--;
            break;
        case 3:
            App::Get().unload(self);
            break;
        case 4:
            App::Get().end();
            break;
        default:
            break;
    }
}
