// File: /workspace/github_cpp_makefile_star2_O2/dnegovan[P]Intruder-On-Donnar-V/Game.cpp
// Function: Game::play(int)
void Game::play(int start)
{
    std::string temp;

    switch (start)
    {
        case 1:
            printPrologue();
            break;
        case 2:
            break;
        case 3:
            return;
    }

    printTitle();
    int input = 0;

    while (input != 1)
    {
        std::cout << "\nEnter 1 to continue:\n";
        input = getInteger();
    }
    std::cout << std::endl << std::endl;

    //print intro - instructions
    printFile("intro.txt", RESET, 0);

    std::cout << "\nHint: This game is played using dynamic numbered menus, so "
              << "keep \none hand over the number keys and one hand over the "
              << "enter key.\n"
              << "\nPress enter to begin\n";
    getline(std::cin, temp);

    //initial status
    printShip();

    //gameplay loop
    while (markNelson.state == UNFINISHED)
    {
        if (currentSpace->actionMenu(markNelson))  //returns false if game over
        {
    		printShip();
    		if (move())  //only true if player decides to move
            {
                //time winds down as player moves
    			if(decrementTime())  //false if game over
                {
                    //show updated map/status
                    printShip();
                }
            }
        }
    }

    printEnding();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpl $0x3, %esi
je 0xc3ad
movq %rdi, %rbx
cmpl $0x1, %esi
jne 0xc27f
callq 0xc3fa
callq 0xc5ba
xorl %eax, %eax
movq 0x9d3b(%rip), %r14      # 0x15fc8
leaq 0x451a(%rip), %r15      # 0x107ae
cmpl $0x1, %eax
je 0xc2ab
movq %r14, %rdi
movq %r15, %rsi
callq 0x31d0
callq 0xaed4
jmp 0xc294
movq 0x9d16(%rip), %rdi      # 0x15fc8
callq 0x30f0
movq %rax, %rdi
callq 0x30f0
leaq 0x44ff(%rip), %rsi      # 0x107c5
leaq -0x60(%rbp), %rdi
leaq -0x1a(%rbp), %rdx
callq 0x30b0
leaq 0x3dd9(%rip), %rsi      # 0x100b3
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x30b0
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
xorps %xmm0, %xmm0
callq 0xb8ec
leaq -0x40(%rbp), %rdi
callq 0x3368
leaq -0x60(%rbp), %rdi
callq 0x3368
movq 0x9cb8(%rip), %rdi      # 0x15fc8
leaq 0x44b8(%rip), %rsi      # 0x107cf
callq 0x31d0
leaq 0x44e9(%rip), %rsi      # 0x1080c
movq %rax, %rdi
callq 0x31d0
leaq 0x4515(%rip), %rsi      # 0x10847
movq %rax, %rdi
callq 0x31d0
leaq 0x4512(%rip), %rsi      # 0x10853
movq %rax, %rdi
callq 0x31d0
movq 0x9c88(%rip), %rdi      # 0x15fd8
leaq -0x80(%rbp), %rsi
callq 0x3030
movq %rbx, %rdi
callq 0xc6b6
cmpl $0x0, 0x30(%rbx)
jne 0xc3a5
movq 0xc0(%rbx), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
testb %al, %al
je 0xc361
movq %rbx, %rdi
callq 0xc6b6
movq %rbx, %rdi
callq 0xcea2
testb %al, %al
je 0xc361
movq %rbx, %rdi
callq 0xd140
testb %al, %al
je 0xc361
movq %rbx, %rdi
callq 0xc6b6
jmp 0xc361
movq %rbx, %rdi
callq 0xd3ee
leaq -0x80(%rbp), %rdi
callq 0x3368
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3368
jmp 0xc3d2
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3368
jmp 0xc3e8
jmp 0xc3e5
jmp 0xc3e5
jmp 0xc3e5
jmp 0xc3e5
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3300
nop