// File: /workspace/github_cpp_makefile_star2_O3/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 0x1300(%rip), %rsi      # 0x54b7
leaq 0x12fa(%rip), %rdx      # 0x54b8
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x2dbc
leaq 0x12e7(%rip), %rsi      # 0x54b9
movq %r14, %rdi
callq 0x2060
testl %eax, %eax
je 0x43ff
movq 0x3ddf(%rip), %r14      # 0x7fc8
movq 0x3de8(%rip), %r12      # 0x7fd8
leaq 0x8(%rsp), %r13
leaq 0x13be(%rip), %rbp      # 0x55ba
leaq 0x12b6(%rip), %r15      # 0x54b9
movl $0x18, %edx
movq %r14, %rdi
leaq 0x12a9(%rip), %rsi      # 0x54bb
callq 0x2180
movl $0x2a, %edx
movq %r14, %rdi
leaq 0x12ae(%rip), %rsi      # 0x54d4
callq 0x2180
movl $0x14, %edx
movq %r14, %rdi
leaq 0x12c5(%rip), %rsi      # 0x54ff
callq 0x2180
movl $0x17, %edx
movq %r14, %rdi
leaq 0x12c6(%rip), %rsi      # 0x5514
callq 0x2180
movl $0x1d, %edx
movq %r14, %rdi
leaq 0x12ca(%rip), %rsi      # 0x552c
callq 0x2180
movl $0x20, %edx
movq %r14, %rdi
leaq 0x12d4(%rip), %rsi      # 0x554a
callq 0x2180
movl $0x25, %edx
movq %r14, %rdi
leaq 0x12e1(%rip), %rsi      # 0x556b
callq 0x2180
movl $0x15, %edx
movq %r14, %rdi
leaq 0x12f3(%rip), %rsi      # 0x5591
callq 0x2180
movl $0x12, %edx
movq %r14, %rdi
leaq 0x12f5(%rip), %rsi      # 0x55a7
callq 0x2180
movq %r12, %rdi
movq %r13, %rsi
callq 0x21b0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2060
testl %eax, %eax
je 0x43a6
movq %r13, %rdi
leaq 0x12dd(%rip), %rsi      # 0x55bc
callq 0x2060
testl %eax, %eax
je 0x43b8
movq %r13, %rdi
leaq 0x12c9(%rip), %rsi      # 0x55bf
callq 0x2060
testl %eax, %eax
je 0x43c2
movq %r13, %rdi
leaq 0x12b5(%rip), %rsi      # 0x55c2
callq 0x2060
testl %eax, %eax
je 0x43cc
movq %r13, %rdi
leaq 0x12a1(%rip), %rsi      # 0x55c5
callq 0x2060
testl %eax, %eax
je 0x43d6
movq %r13, %rdi
leaq 0x135b(%rip), %rsi      # 0x5696
callq 0x2060
testl %eax, %eax
je 0x43e0
movq %r13, %rdi
movq %r15, %rsi
callq 0x2060
testl %eax, %eax
leaq 0x1296(%rip), %rsi      # 0x55f2
leaq 0x1265(%rip), %rax      # 0x55c8
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 0x43ec
movq %rbx, %rdi
callq 0x4452
movq %rbx, %rdi
callq 0x44fe
jmp 0x43ec
movq %rbx, %rdi
callq 0x45ae
jmp 0x43ec
movq %rbx, %rdi
callq 0x4648
jmp 0x43ec
movq %rbx, %rdi
callq 0x46e2
jmp 0x43ec
movq %rbx, %rdi
callq 0x4762
jmp 0x43ec
movq 0x2d0(%rbx), %rdi
callq 0x3732
movq %r13, %rdi
movq %r15, %rsi
callq 0x2060
testl %eax, %eax
jne 0x4203
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x441b
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 0x4449
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
nop