// File: angelapwen[P]text-based-game/space.cpp
// Function: Space::makeMove() const
char Space::makeMove() const {
	cout << "Your options are: " << endl;

	// Print the options available in the current room
	if (this->top != nullptr) {
		cout << "- up: " ;
		cout << "This would lead to the " << this->top->name << "." << endl;
	}
	if (this->bottom != nullptr) {
		cout << "- down: ";
		cout << "This would lead to the " << this->bottom->name << "." << endl;
	}
	if (this->left != nullptr) {
		cout << "- left: ";
		cout << "This would lead to the " << this->left->name << "." << endl;
	}
	if (this->right != nullptr) {
		cout << "- right: ";
		cout << "This would lead to the " << this->right->name << "." << endl;
	}

	// Display corner option only if the bool is true
	if (cornerAccess) {
		if (this->corner != nullptr) {
			cout << "- corner: ";
			cout << "This would lead to the " << this->corner->name << "." << endl;
		}
	}

	cout << "- exit: ";
	cout << "You may choose the Emergency Exit and leave your mission "
			"incomplete." << endl;

	cout << "Enter only up, down, left, right, corner, or exit." << endl;

	string choice = moveValidation();

	// Return the char value of the validated move
	if (choice == "up") {
		return 't';
	}

	else if (choice == "down") {
		return 'b';
	}

	else if (choice == "left") {
		return 'l';
	}

	else if (choice == "right") {
		return 'r';
	}

	// Else user picked corner
	else if (choice == "corner") {
		return 'c';
	}

	// Else user chose to exit
	else {
		return 'e';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0xd595(%rip), %rdi      # 0x1afd0
leaq 0x7a4e(%rip), %rsi      # 0x15490
callq 0x3200
movq %rax, %rdi
movq 0xd56f(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x48(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0xdab9
movq 0xd568(%rip), %rdi      # 0x1afd0
leaq 0x7a34(%rip), %rsi      # 0x154a3
callq 0x3200
movq 0xd555(%rip), %rdi      # 0x1afd0
leaq 0x7a28(%rip), %rsi      # 0x154aa
callq 0x3200
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rsi
addq $0x8, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x55a7(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xd50c(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x48(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xdb1c
movq 0xd505(%rip), %rdi      # 0x1afd0
leaq 0x79f0(%rip), %rsi      # 0x154c2
callq 0x3200
movq 0xd4f2(%rip), %rdi      # 0x1afd0
leaq 0x79c5(%rip), %rsi      # 0x154aa
callq 0x3200
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x60(%rax), %rsi
addq $0x8, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x5544(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xd4a9(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x48(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xdb7f
movq 0xd4a2(%rip), %rdi      # 0x1afd0
leaq 0x7996(%rip), %rsi      # 0x154cb
callq 0x3200
movq 0xd48f(%rip), %rdi      # 0x1afd0
leaq 0x7962(%rip), %rsi      # 0x154aa
callq 0x3200
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rsi
addq $0x8, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x54e1(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xd446(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x48(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xdbe2
movq 0xd43f(%rip), %rdi      # 0x1afd0
leaq 0x793c(%rip), %rsi      # 0x154d4
callq 0x3200
movq 0xd42c(%rip), %rdi      # 0x1afd0
leaq 0x78ff(%rip), %rsi      # 0x154aa
callq 0x3200
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x547e(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xd3e3(%rip), %rsi      # 0x1afc0
callq 0x3230
movq -0x48(%rbp), %rax
testb $0x1, 0x78(%rax)
je 0xdc51
movq -0x48(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xdc4f
movq 0xd3d2(%rip), %rdi      # 0x1afd0
leaq 0x78d9(%rip), %rsi      # 0x154de
callq 0x3200
movq 0xd3bf(%rip), %rdi      # 0x1afd0
leaq 0x7892(%rip), %rsi      # 0x154aa
callq 0x3200
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x68(%rax), %rsi
addq $0x8, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x5411(%rip), %rsi      # 0x1304c
callq 0x3200
movq %rax, %rdi
movq 0xd376(%rip), %rsi      # 0x1afc0
callq 0x3230
jmp 0xdc51
movq 0xd378(%rip), %rdi      # 0x1afd0
movq %rdi, -0x68(%rbp)
leaq 0x7886(%rip), %rsi      # 0x154e9
callq 0x3200
movq -0x68(%rbp), %rdi
leaq 0x787f(%rip), %rsi      # 0x154f2
callq 0x3200
movq %rax, %rdi
movq 0xd33e(%rip), %rsi      # 0x1afc0
movq %rsi, -0x60(%rbp)
callq 0x3230
movq -0x68(%rbp), %rdi
leaq 0x78a1(%rip), %rsi      # 0x15537
callq 0x3200
movq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0x3230
movq -0x48(%rbp), %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0xdde0
movq -0x58(%rbp), %rdi
leaq 0x78a7(%rip), %rsi      # 0x1556a
callq 0x3f80
movb %al, -0x49(%rbp)
jmp 0xdccd
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xdcd6
jmp 0xdd00
movb $0x74, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0xddba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3130
jmp 0xddcc
leaq 0x7866(%rip), %rsi      # 0x1556d
leaq -0x30(%rbp), %rdi
callq 0x3f80
movb %al, -0x69(%rbp)
jmp 0xdd15
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0xdd1e
jmp 0xdd2e
movb $0x62, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0xddba
leaq 0x783d(%rip), %rsi      # 0x15572
leaq -0x30(%rbp), %rdi
callq 0x3f80
movb %al, -0x6a(%rbp)
jmp 0xdd43
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0xdd4c
jmp 0xdd59
movb $0x6c, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0xddba
leaq 0x7817(%rip), %rsi      # 0x15577
leaq -0x30(%rbp), %rdi
callq 0x3f80
movb %al, -0x6b(%rbp)
jmp 0xdd6e
movb -0x6b(%rbp), %al
testb $0x1, %al
jne 0xdd77
jmp 0xdd84
movb $0x72, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0xddba
leaq 0x77f2(%rip), %rsi      # 0x1557d
leaq -0x30(%rbp), %rdi
callq 0x3f80
movb %al, -0x6c(%rbp)
jmp 0xdd99
movb -0x6c(%rbp), %al
testb $0x1, %al
jne 0xdda2
jmp 0xddaf
movb $0x63, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0xddba
movb $0x65, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3130
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3370
nopw %cs:(%rax,%rax)