// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdx
movq %rsp, %rdi
pushq $0xf
popq %rsi
callq 0x3984
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3038
movq 0x5929(%rip), %rdi      # 0xbfd8
leaq 0x2193(%rip), %rsi      # 0x8849
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq 0x590e(%rip), %rdi      # 0xbfd8
leaq 0x218a(%rip), %rsi      # 0x885b
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq 0x58dd(%rip), %rdi      # 0xbfd8
leaq 0x2169(%rip), %rsi      # 0x886b
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq %rax, %rdi
callq 0x22f8
movq 0x20(%rbx), %rdi
callq 0x305e
movl %eax, %r14d
movq 0x20(%rbx), %rdi
callq 0x3070
movl %eax, %r15d
andl $0x0, 0x74(%rbx)
movq %rsp, %rdi
callq 0x50ce
movq 0x5880(%rip), %rdi      # 0xbfd8
leaq 0x211c(%rip), %rsi      # 0x887b
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq 0x5865(%rip), %rdi      # 0xbfd8
leaq 0x20e1(%rip), %rsi      # 0x885b
callq 0x21a0
movq %rax, %r12
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r12, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq 0x5834(%rip), %rdi      # 0xbfd8
leaq 0x20c0(%rip), %rsi      # 0x886b
callq 0x21a0
movq %rax, %r12
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r12, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq %rax, %rdi
callq 0x22f8
movq 0x20(%rbx), %rdi
callq 0x305e
leal 0x1(%r15), %ecx
cmpl %eax, %ecx
jne 0x67eb
pushq $0x1
jmp 0x6808
movq 0x57e6(%rip), %rdi      # 0xbfd8
leaq 0x2089(%rip), %rsi      # 0x8882
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
pushq $-0x1
popq %rax
addl %eax, 0x74(%rbx)
movq %rsp, %rdi
callq 0x5586
movq 0x57bd(%rip), %rdi      # 0xbfd8
leaq 0x2085(%rip), %rsi      # 0x88a7
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq 0x57a2(%rip), %rdi      # 0xbfd8
leaq 0x201e(%rip), %rsi      # 0x885b
callq 0x21a0
movq %rax, %r12
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r12, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq 0x5771(%rip), %rdi      # 0xbfd8
leaq 0x1ffd(%rip), %rsi      # 0x886b
callq 0x21a0
movq %rax, %r12
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r12, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq %rax, %rdi
callq 0x22f8
movq 0x20(%rbx), %rdi
callq 0x305e
leal 0x1(%r14), %ecx
cmpl %eax, %ecx
jne 0x68ae
pushq $0x1
jmp 0x68cb
movq 0x5723(%rip), %rdi      # 0xbfd8
leaq 0x1ff5(%rip), %rsi      # 0x88b1
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
pushq $-0x1
popq %rax
addl %eax, 0x74(%rbx)
movq %rsp, %rdi
callq 0x5266
movq 0x56fa(%rip), %rdi      # 0xbfd8
leaq 0x1fdc(%rip), %rsi      # 0x88c1
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq 0x56df(%rip), %rdi      # 0xbfd8
leaq 0x1f5b(%rip), %rsi      # 0x885b
callq 0x21a0
movq %rax, %r12
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r12, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq 0x56ae(%rip), %rdi      # 0xbfd8
leaq 0x1f3a(%rip), %rsi      # 0x886b
callq 0x21a0
movq %rax, %r12
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r12, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq %rax, %rdi
callq 0x22f8
movq 0x20(%rbx), %rdi
callq 0x305e
cmpl %eax, %r15d
jne 0x696e
pushq $0x1
jmp 0x698b
movq 0x5663(%rip), %rdi      # 0xbfd8
leaq 0x1f4e(%rip), %rsi      # 0x88ca
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
pushq $-0x1
popq %rax
addl %eax, 0x74(%rbx)
movq %rsp, %rdi
callq 0x53f6
movq 0x563a(%rip), %rdi      # 0xbfd8
leaq 0x1eea(%rip), %rsi      # 0x888f
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq 0x561f(%rip), %rdi      # 0xbfd8
leaq 0x1e9b(%rip), %rsi      # 0x885b
callq 0x21a0
movq %rax, %r15
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r15, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq 0x55ee(%rip), %rdi      # 0xbfd8
leaq 0x1e7a(%rip), %rsi      # 0x886b
callq 0x21a0
movq %rax, %r15
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r15, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
callq 0x22f8
movq %rax, %rdi
callq 0x22f8
movq 0x20(%rbx), %rdi
callq 0x305e
cmpl %eax, %r14d
jne 0x6a2e
pushq $0x1
jmp 0x6a4b
movq 0x55a3(%rip), %rdi      # 0xbfd8
leaq 0x1e5c(%rip), %rsi      # 0x8898
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
pushq $-0x1
popq %rax
addl 0x74(%rbx), %eax
movl %eax, 0x74(%rbx)
cmpl $0x4, %eax
jne 0x6a72
movq 0x557a(%rip), %rdi      # 0xbfd8
leaq 0x1e74(%rip), %rsi      # 0x88d9
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq %rsp, %rdi
callq 0x644c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6a8c
jmp 0x6a8c
jmp 0x6a8c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x644c
movq %rbx, %rdi
callq 0x22a0
nop