// File: Naomi1745698[P]BigPrac/test.cpp
// Function: test::mapTesting()
void test::mapTesting(){
	space spaceMap(15, playerShip);
	//Starting positon.
	playerShip->setCoordinate(0,0);
	std::cout << "Starting location" << std::endl;
	std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
	std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
	int initalRow = playerShip->getRowCoordinate();	//Set reference point to determine direction 
	int initalColumn = playerShip->getColumnCoordinate();
	PASS = 0;
 	for(int i = 0; i<4;i++){		//Go into a direction of sqaure to test all movements.
		switch (i) {
			case 0: 
				spaceMap.moveUp();
				std::cout << "MoveUp" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalColumn+1 == playerShip->getRowCoordinate()){
					PASS++;
				}else{ 	
					std::cout << "ERROR moveUp" << std::endl;
					PASS--;
				}
				break;
			case 3: 
				spaceMap.moveLeft();
				std::cout << "Moveleft" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalRow == playerShip->getRowCoordinate()){
					PASS++;
				}else{
					std::cout << "ERROR moveLeft" << std::endl;
					PASS--;
				}
				break;
			case 1: 
				spaceMap.moveRight();
				std::cout << "MoveRight" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalRow+1 == playerShip->getRowCoordinate()){
					PASS++;
				}else{
					std::cout << "ERROR moveRight" << std::endl;
					PASS--;
				}
				break;
			case 2: 
				spaceMap.moveDown();
				std::cout << "MoveDown" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalColumn == playerShip->getRowCoordinate()){
					PASS++;
				}else{
					std::cout << "ERROR moveDown" << std::endl;
					PASS--;
				}
				break;
			default:

				break;
		}
};

	if(PASS == 4){
		std::cout << "<------------------MOVEMENT CONDITIONS PASSED--------------->" << std::endl;
	};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq 0x20(%rax), %rdx
leaq -0x50(%rbp), %rdi
movl $0xf, %esi
callq 0x4a34
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x40e8
jmp 0x799c
movq 0x6635(%rip), %rdi      # 0xdfd8
leaq 0x2e9f(%rip), %rsi      # 0xa849
callq 0x31c0
movq %rax, -0x78(%rbp)
jmp 0x79b5
movq -0x78(%rbp), %rdi
movq 0x6608(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x79c7
movq 0x660a(%rip), %rdi      # 0xdfd8
leaq 0x2e86(%rip), %rsi      # 0xa85b
callq 0x31c0
movq %rax, -0x80(%rbp)
jmp 0x79e0
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x84(%rbp)
jmp 0x79f5
movl -0x84(%rbp), %esi
movq -0x80(%rbp), %rdi
callq 0x3320
movq %rax, -0x90(%rbp)
jmp 0x7a0d
movq -0x90(%rbp), %rdi
movq 0x65ad(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7a22
movq 0x65af(%rip), %rdi      # 0xdfd8
leaq 0x2e3b(%rip), %rsi      # 0xa86b
callq 0x31c0
movq %rax, -0x98(%rbp)
jmp 0x7a3e
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4120
movl %eax, -0x9c(%rbp)
jmp 0x7a53
movl -0x9c(%rbp), %esi
movq -0x98(%rbp), %rdi
callq 0x3320
movq %rax, -0xa8(%rbp)
jmp 0x7a6e
movq -0xa8(%rbp), %rdi
movq 0x654c(%rip), %rsi      # 0xdfc8
callq 0x31f0
movq %rax, -0xb0(%rbp)
jmp 0x7a8a
movq -0xb0(%rbp), %rdi
movq 0x6530(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7a9f
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0xb4(%rbp)
jmp 0x7ab4
movq -0x70(%rbp), %rax
movl -0xb4(%rbp), %ecx
movl %ecx, -0x60(%rbp)
movq 0x20(%rax), %rdi
callq 0x4120
movl %eax, -0xb8(%rbp)
jmp 0x7ad2
movq -0x70(%rbp), %rax
movl -0xb8(%rbp), %ecx
movl %ecx, -0x64(%rbp)
movl $0x0, 0x74(%rax)
movl $0x0, -0x68(%rbp)
cmpl $0x4, -0x68(%rbp)
jge 0x81b7
movl -0x68(%rbp), %eax
movq %rax, -0xc0(%rbp)
subq $0x3, %rax
ja 0x81a5
movq -0xc0(%rbp), %rax
leaq 0x2ce7(%rip), %rcx      # 0xa800
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x74fc
jmp 0x8206
leaq -0x50(%rbp), %rdi
callq 0x617e
jmp 0x7b47
movq 0x648a(%rip), %rdi      # 0xdfd8
leaq 0x2d26(%rip), %rsi      # 0xa87b
callq 0x31c0
movq %rax, -0xc8(%rbp)
jmp 0x7b63
movq -0xc8(%rbp), %rdi
movq 0x6457(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7b78
movq 0x6459(%rip), %rdi      # 0xdfd8
leaq 0x2cd5(%rip), %rsi      # 0xa85b
callq 0x31c0
movq %rax, -0xd0(%rbp)
jmp 0x7b94
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0xd4(%rbp)
jmp 0x7ba9
movl -0xd4(%rbp), %esi
movq -0xd0(%rbp), %rdi
callq 0x3320
movq %rax, -0xe0(%rbp)
jmp 0x7bc4
movq -0xe0(%rbp), %rdi
movq 0x63f6(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7bd9
movq 0x63f8(%rip), %rdi      # 0xdfd8
leaq 0x2c84(%rip), %rsi      # 0xa86b
callq 0x31c0
movq %rax, -0xe8(%rbp)
jmp 0x7bf5
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4120
movl %eax, -0xec(%rbp)
jmp 0x7c0a
movl -0xec(%rbp), %esi
movq -0xe8(%rbp), %rdi
callq 0x3320
movq %rax, -0xf8(%rbp)
jmp 0x7c25
movq -0xf8(%rbp), %rdi
movq 0x6395(%rip), %rsi      # 0xdfc8
callq 0x31f0
movq %rax, -0x100(%rbp)
jmp 0x7c41
movq -0x100(%rbp), %rdi
movq 0x6379(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7c56
movq -0x70(%rbp), %rax
movl -0x64(%rbp), %ecx
incl %ecx
movl %ecx, -0x108(%rbp)
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x104(%rbp)
jmp 0x7c76
movl -0x108(%rbp), %eax
movl -0x104(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7c95
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x7cd3
movq 0x633c(%rip), %rdi      # 0xdfd8
leaq 0x2bdf(%rip), %rsi      # 0xa882
callq 0x31c0
movq %rax, -0x110(%rbp)
jmp 0x7cb1
movq -0x110(%rbp), %rdi
movq 0x6309(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7cc6
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x81a7
leaq -0x50(%rbp), %rdi
callq 0x64a6
jmp 0x7ce3
movq 0x62ee(%rip), %rdi      # 0xdfd8
leaq 0x2b9e(%rip), %rsi      # 0xa88f
callq 0x31c0
movq %rax, -0x118(%rbp)
jmp 0x7cff
movq -0x118(%rbp), %rdi
movq 0x62bb(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7d14
movq 0x62bd(%rip), %rdi      # 0xdfd8
leaq 0x2b39(%rip), %rsi      # 0xa85b
callq 0x31c0
movq %rax, -0x120(%rbp)
jmp 0x7d30
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x124(%rbp)
jmp 0x7d45
movl -0x124(%rbp), %esi
movq -0x120(%rbp), %rdi
callq 0x3320
movq %rax, -0x130(%rbp)
jmp 0x7d60
movq -0x130(%rbp), %rdi
movq 0x625a(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7d75
movq 0x625c(%rip), %rdi      # 0xdfd8
leaq 0x2ae8(%rip), %rsi      # 0xa86b
callq 0x31c0
movq %rax, -0x138(%rbp)
jmp 0x7d91
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4120
movl %eax, -0x13c(%rbp)
jmp 0x7da6
movl -0x13c(%rbp), %esi
movq -0x138(%rbp), %rdi
callq 0x3320
movq %rax, -0x148(%rbp)
jmp 0x7dc1
movq -0x148(%rbp), %rdi
movq 0x61f9(%rip), %rsi      # 0xdfc8
callq 0x31f0
movq %rax, -0x150(%rbp)
jmp 0x7ddd
movq -0x150(%rbp), %rdi
movq 0x61dd(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7df2
movq -0x70(%rbp), %rax
movl -0x60(%rbp), %ecx
movl %ecx, -0x158(%rbp)
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x154(%rbp)
jmp 0x7e10
movl -0x158(%rbp), %eax
movl -0x154(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7e2f
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x7e6d
movq 0x61a2(%rip), %rdi      # 0xdfd8
leaq 0x2a5b(%rip), %rsi      # 0xa898
callq 0x31c0
movq %rax, -0x160(%rbp)
jmp 0x7e4b
movq -0x160(%rbp), %rdi
movq 0x616f(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7e60
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x81a7
leaq -0x50(%rbp), %rdi
callq 0x6636
jmp 0x7e7d
movq 0x6154(%rip), %rdi      # 0xdfd8
leaq 0x2a1c(%rip), %rsi      # 0xa8a7
callq 0x31c0
movq %rax, -0x168(%rbp)
jmp 0x7e99
movq -0x168(%rbp), %rdi
movq 0x6121(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7eae
movq 0x6123(%rip), %rdi      # 0xdfd8
leaq 0x299f(%rip), %rsi      # 0xa85b
callq 0x31c0
movq %rax, -0x170(%rbp)
jmp 0x7eca
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x174(%rbp)
jmp 0x7edf
movl -0x174(%rbp), %esi
movq -0x170(%rbp), %rdi
callq 0x3320
movq %rax, -0x180(%rbp)
jmp 0x7efa
movq -0x180(%rbp), %rdi
movq 0x60c0(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7f0f
movq 0x60c2(%rip), %rdi      # 0xdfd8
leaq 0x294e(%rip), %rsi      # 0xa86b
callq 0x31c0
movq %rax, -0x188(%rbp)
jmp 0x7f2b
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4120
movl %eax, -0x18c(%rbp)
jmp 0x7f40
movl -0x18c(%rbp), %esi
movq -0x188(%rbp), %rdi
callq 0x3320
movq %rax, -0x198(%rbp)
jmp 0x7f5b
movq -0x198(%rbp), %rdi
movq 0x605f(%rip), %rsi      # 0xdfc8
callq 0x31f0
movq %rax, -0x1a0(%rbp)
jmp 0x7f77
movq -0x1a0(%rbp), %rdi
movq 0x6043(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7f8c
movq -0x70(%rbp), %rax
movl -0x60(%rbp), %ecx
incl %ecx
movl %ecx, -0x1a8(%rbp)
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x1a4(%rbp)
jmp 0x7fac
movl -0x1a8(%rbp), %eax
movl -0x1a4(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7fcb
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x8009
movq 0x6006(%rip), %rdi      # 0xdfd8
leaq 0x28d8(%rip), %rsi      # 0xa8b1
callq 0x31c0
movq %rax, -0x1b0(%rbp)
jmp 0x7fe7
movq -0x1b0(%rbp), %rdi
movq 0x5fd3(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x7ffc
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x81a7
leaq -0x50(%rbp), %rdi
callq 0x6316
jmp 0x8019
movq 0x5fb8(%rip), %rdi      # 0xdfd8
leaq 0x289a(%rip), %rsi      # 0xa8c1
callq 0x31c0
movq %rax, -0x1b8(%rbp)
jmp 0x8035
movq -0x1b8(%rbp), %rdi
movq 0x5f85(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x804a
movq 0x5f87(%rip), %rdi      # 0xdfd8
leaq 0x2803(%rip), %rsi      # 0xa85b
callq 0x31c0
movq %rax, -0x1c0(%rbp)
jmp 0x8066
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x1c4(%rbp)
jmp 0x807b
movl -0x1c4(%rbp), %esi
movq -0x1c0(%rbp), %rdi
callq 0x3320
movq %rax, -0x1d0(%rbp)
jmp 0x8096
movq -0x1d0(%rbp), %rdi
movq 0x5f24(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x80ab
movq 0x5f26(%rip), %rdi      # 0xdfd8
leaq 0x27b2(%rip), %rsi      # 0xa86b
callq 0x31c0
movq %rax, -0x1d8(%rbp)
jmp 0x80c7
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4120
movl %eax, -0x1dc(%rbp)
jmp 0x80dc
movl -0x1dc(%rbp), %esi
movq -0x1d8(%rbp), %rdi
callq 0x3320
movq %rax, -0x1e8(%rbp)
jmp 0x80f7
movq -0x1e8(%rbp), %rdi
movq 0x5ec3(%rip), %rsi      # 0xdfc8
callq 0x31f0
movq %rax, -0x1f0(%rbp)
jmp 0x8113
movq -0x1f0(%rbp), %rdi
movq 0x5ea7(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x8128
movq -0x70(%rbp), %rax
movl -0x64(%rbp), %ecx
movl %ecx, -0x1f8(%rbp)
movq 0x20(%rax), %rdi
callq 0x410e
movl %eax, -0x1f4(%rbp)
jmp 0x8146
movl -0x1f8(%rbp), %eax
movl -0x1f4(%rbp), %ecx
cmpl %ecx, %eax
jne 0x8165
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x81a3
movq 0x5e6c(%rip), %rdi      # 0xdfd8
leaq 0x2757(%rip), %rsi      # 0xa8ca
callq 0x31c0
movq %rax, -0x200(%rbp)
jmp 0x8181
movq -0x200(%rbp), %rdi
movq 0x5e39(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x8196
movq -0x70(%rbp), %rax
movl 0x74(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x74(%rax)
jmp 0x81a7
jmp 0x81a7
jmp 0x81a9
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x7aed
movq -0x70(%rbp), %rax
cmpl $0x4, 0x74(%rax)
jne 0x81f4
movq 0x5e10(%rip), %rdi      # 0xdfd8
leaq 0x270a(%rip), %rsi      # 0xa8d9
callq 0x31c0
movq %rax, -0x208(%rbp)
jmp 0x81dd
movq -0x208(%rbp), %rdi
movq 0x5ddd(%rip), %rsi      # 0xdfc8
callq 0x31f0
jmp 0x81f2
jmp 0x81f4
leaq -0x50(%rbp), %rdi
callq 0x74fc
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3330
nop