// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::gameMenu()
void Game::gameMenu()
{
    std::string option = "a";

    while (option != "q")
    {
        std::cout << "\n<<< Main Game Menu >>>\n";
        std::cout << "\tv. View the arrays of heros and monsters\n";
        std::cout << "\tah. Add a new Hero\n";
        std::cout << "\tam. Add a new Monster\n";
        std::cout << "\tph. Create a party of heros\n";
        std::cout << "\tpm. Create a party of monsters\n";
        std::cout << "\tb. Battle with the existing parties\n";
        std::cout << "\tq. Quit the program\n";
        std::cout << "Select an option: ";
        std::cin >> option;

        if (option == "v")
        {
            printHeroArray();
            printMonsterArray();
        }
        else if (option == "ah")
        {
            createHero();
        }
        else if (option == "am")
        {
            createMonster();
        }
        else if (option == "ph")
        {
            createHeroParty();
        }
        else if (option == "pm")
        {
            createMonsterParty();
        }
        else if (option == "b")
        {
            the_battle->battleLoop();
        }
        else if (option == "q")
        {
            std::cout << "Thanks for playing! See you next time ..." << std::endl;
        }
        else
        {
            std::cout << "Incorrect option. Try again ..." << std::endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x12c8(%rip), %rsi      # 0x54a7
leaq 0x12c2(%rip), %rdx      # 0x54a8
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x2dba
leaq 0x12af(%rip), %rsi      # 0x54a9
movq %r14, %rdi
callq 0x2060
testl %eax, %eax
je 0x4427
movq 0x3db7(%rip), %r14      # 0x7fc8
movq 0x3dc0(%rip), %r12      # 0x7fd8
leaq 0x8(%rsp), %r13
leaq 0x1386(%rip), %rbp      # 0x55aa
leaq 0x127e(%rip), %r15      # 0x54a9
movl $0x18, %edx
movq %r14, %rdi
leaq 0x1271(%rip), %rsi      # 0x54ab
callq 0x2180
movl $0x2a, %edx
movq %r14, %rdi
leaq 0x1276(%rip), %rsi      # 0x54c4
callq 0x2180
movl $0x14, %edx
movq %r14, %rdi
leaq 0x128d(%rip), %rsi      # 0x54ef
callq 0x2180
movl $0x17, %edx
movq %r14, %rdi
leaq 0x128e(%rip), %rsi      # 0x5504
callq 0x2180
movl $0x1d, %edx
movq %r14, %rdi
leaq 0x1292(%rip), %rsi      # 0x551c
callq 0x2180
movl $0x20, %edx
movq %r14, %rdi
leaq 0x129c(%rip), %rsi      # 0x553a
callq 0x2180
movl $0x25, %edx
movq %r14, %rdi
leaq 0x12a9(%rip), %rsi      # 0x555b
callq 0x2180
movl $0x15, %edx
movq %r14, %rdi
leaq 0x12bb(%rip), %rsi      # 0x5581
callq 0x2180
movl $0x12, %edx
movq %r14, %rdi
leaq 0x12bd(%rip), %rsi      # 0x5597
callq 0x2180
movq %r12, %rdi
movq %r13, %rsi
callq 0x21b0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2060
testl %eax, %eax
je 0x43ce
movq %r13, %rdi
leaq 0x12a5(%rip), %rsi      # 0x55ac
callq 0x2060
testl %eax, %eax
je 0x43e0
movq %r13, %rdi
leaq 0x1291(%rip), %rsi      # 0x55af
callq 0x2060
testl %eax, %eax
je 0x43ea
movq %r13, %rdi
leaq 0x127d(%rip), %rsi      # 0x55b2
callq 0x2060
testl %eax, %eax
je 0x43f4
movq %r13, %rdi
leaq 0x1269(%rip), %rsi      # 0x55b5
callq 0x2060
testl %eax, %eax
je 0x43fe
movq %r13, %rdi
leaq 0x1323(%rip), %rsi      # 0x5686
callq 0x2060
testl %eax, %eax
je 0x4408
movq %r13, %rdi
movq %r15, %rsi
callq 0x2060
testl %eax, %eax
leaq 0x125e(%rip), %rsi      # 0x55e2
leaq 0x122d(%rip), %rax      # 0x55b8
cmoveq %rax, %rsi
movl $0x1f, %edx
movl $0x29, %eax
cmoveq %rax, %rdx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
jmp 0x4414
movq %rbx, %rdi
callq 0x447a
movq %rbx, %rdi
callq 0x4526
jmp 0x4414
movq %rbx, %rdi
callq 0x45d6
jmp 0x4414
movq %rbx, %rdi
callq 0x4670
jmp 0x4414
movq %rbx, %rdi
callq 0x470a
jmp 0x4414
movq %rbx, %rdi
callq 0x478a
jmp 0x4414
movq 0x2d0(%rbx), %rdi
callq 0x373a
movq %r13, %rdi
movq %r15, %rsi
callq 0x2060
testl %eax, %eax
jne 0x422b
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4443
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4471
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
nop