// File: isimplyexcel[P]text-based-game/Game.cpp
// Function: Game::inGameMenu()
void Game::inGameMenu(){
	//	3 options
	int actionChoice;
	bool moved = false;
	do{
		//	display map
		displayMap(location->getCarName());

		std::cout << "\nAction Menu\n";
		std::cout << "1) Left\n";
		std::cout << "2) Right\n";
		std::cout << "3) Check backpack\n";

		std::cout << "Enter your choice: " << std::endl;

		actionChoice = validate(1,3);

		switch(actionChoice){
			//	Go left
			case 1:
			{
				if(location->getLeft() != nullptr){
					location = location->getLeft();
					moved = true;
				}
				else{
					std::cout << "\nThere is no train car to the left!\n" << std::endl;
				}
				break;
			}

			//	Go right
			case 2:
			{
				if(location->getRight() != nullptr){
					location = location->getRight();
					moved = true;
				}
				else{
					std::cout << "\nThere is no train car to the right!\n";
				}
				break;
			}

			//	See backpack
			case 3:
			{
				//	print contents of backpack
				this->printContainer();
				break;
			}
		}
	}while(!moved);

	//	increment steps after successfully moving
	steps++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movb $0x0, -0xd(%rbp)
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x7e80
movq -0x50(%rbp), %rdi
callq 0x7890
jmp 0x6e58
leaq -0x30(%rbp), %rdi
callq 0x2100
movq 0x6168(%rip), %rdi      # 0xcfd0
movq %rdi, -0x60(%rbp)
leaq 0x29e6(%rip), %rsi      # 0x9859
callq 0x21a0
movq -0x60(%rbp), %rdi
leaq 0x29e4(%rip), %rsi      # 0x9867
callq 0x21a0
movq -0x60(%rbp), %rdi
leaq 0x29dd(%rip), %rsi      # 0x9870
callq 0x21a0
movq -0x60(%rbp), %rdi
leaq 0x29d7(%rip), %rsi      # 0x987a
callq 0x21a0
movq -0x60(%rbp), %rdi
leaq 0x2190(%rip), %rsi      # 0x9043
callq 0x21a0
movq %rax, %rdi
movq 0x60fe(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl $0x1, %edi
movl $0x3, %esi
callq 0x7f10
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x54(%rbp)
subl $0x1, %eax
je 0x6f1f
jmp 0x6ee6
movl -0x54(%rbp), %eax
subl $0x2, %eax
je 0x6f74
jmp 0x6ef4
movl -0x54(%rbp), %eax
subl $0x3, %eax
je 0x6fba
jmp 0x6fc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2100
jmp 0x6fe3
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x7e40
cmpq $0x0, %rax
je 0x6f50
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x7e40
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
movb $0x1, -0xd(%rbp)
jmp 0x6f72
movq 0x6079(%rip), %rdi      # 0xcfd0
leaq 0x292f(%rip), %rsi      # 0x988d
callq 0x21a0
movq %rax, %rdi
movq 0x6053(%rip), %rsi      # 0xcfc0
callq 0x21d0
jmp 0x6fc3
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x7e60
cmpq $0x0, %rax
je 0x6fa5
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x7e60
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
movb $0x1, -0xd(%rbp)
jmp 0x6fb8
movq 0x6024(%rip), %rdi      # 0xcfd0
leaq 0x28ff(%rip), %rsi      # 0x98b2
callq 0x21a0
jmp 0x6fc3
movq -0x48(%rbp), %rdi
callq 0x6ff0
jmp 0x6fc5
movb -0xd(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6e38
movq -0x48(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x22c0
nopl (%rax)