// File: /workspace/github_cpp_makefile_star2_O2/Naomi1745698[P]BigPrac/test.cpp
// Function: test::boundaryTesting()
void test::boundaryTesting(){
	space spaceMap(15, playerShip);
	PASS = 0;
	playerShip->setCoordinate(0,0);
	//spaceMap.printMap();			//space map print
	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();
	int initalColumn = playerShip->getColumnCoordinate();
	for(int i = 0; i<4;i++){
		playerShip->setCoordinate(0,0);
		switch (i) {
			case 0:
				//while loop to continue in the move up direction and stop once the boundary has been reached.  
				while(true){ 
					int preYCoordinate = playerShip->getRowCoordinate();
					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(preYCoordinate == playerShip->getRowCoordinate()){
						std::cout << "Reached top of map (" << playerShip->getRowCoordinate() << "," << playerShip->getColumnCoordinate() << ")";
						std::cout << "" << std::endl;
						PASS++;
						break;
					};
				}
				break;
			case 3: 
				//while loop to continue in the move left direction and stop once the boundary has been reached. 
				while(true){
					int preXCoordinate = playerShip->getColumnCoordinate();
					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(preXCoordinate == playerShip->getColumnCoordinate()){
						std::cout << "Reached left of map (" << playerShip->getRowCoordinate() << "," << playerShip->getColumnCoordinate() << ")";
						std::cout << "" << std::endl;
						PASS++;
						break;						
					}
				}
				break;
			case 1:
				//while loop to continue in the move right direction and stop once the boundary has been reached.  
				while(true){
					int preXCoordinate = playerShip->getColumnCoordinate();
					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(preXCoordinate == playerShip->getColumnCoordinate()){
						std::cout << "Reached right of map (" << playerShip->getRowCoordinate() << "," << playerShip->getColumnCoordinate() << ")";
						std::cout << "" << std::endl;
						PASS++;
						break;						
					}
				}
				break;
			case 2: 
				while(true){
				//while loop to continue in the move down direction and stop once the boundary has been reached.  
					int preYCoordinate = playerShip->getRowCoordinate();
					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(preYCoordinate == playerShip->getRowCoordinate()){
						std::cout << "Reached down of map (" << playerShip->getRowCoordinate() << "," << playerShip->getColumnCoordinate() << ")";
						std::cout << "" << std::endl;
						PASS++;
						break;
					};
				}
				break;
			default:
			
				break;
		}
};
if(PASS == 4 ){
	std::cout << "<------------------boundaryTesting PASS--------------->" << std::endl;
}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdx
leaq 0x10(%rsp), %rdi
pushq $0xf
popq %rsi
callq 0x3984
andl $0x0, 0x74(%rbx)
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3038
movq 0x54fe(%rip), %rdi      # 0xbfd8
leaq 0x1d68(%rip), %rsi      # 0x8849
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq 0x54e3(%rip), %rdi      # 0xbfd8
leaq 0x1d5f(%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 0x54b2(%rip), %rdi      # 0xbfd8
leaq 0x1d3e(%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
movq 0x20(%rbx), %rdi
callq 0x3070
xorl %r14d, %r14d
movq 0x5464(%rip), %r15      # 0xbfd8
leaq 0x1ce0(%rip), %r13      # 0x885b
leaq 0x1ce9(%rip), %rbp      # 0x886b
cmpl $0x4, %r14d
je 0x6ff4
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3038
movl %r14d, 0xc(%rsp)
movl %r14d, %eax
leaq 0x1c68(%rip), %rcx      # 0x8810
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rbx), %rdi
callq 0x305e
movl %eax, %r12d
leaq 0x10(%rsp), %rdi
callq 0x50ce
movq %r15, %rdi
leaq 0x1caa(%rip), %rsi      # 0x887b
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq %r15, %rdi
movq %r13, %rsi
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 %r15, %rdi
movq %rbp, %rsi
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
cmpl %eax, %r12d
jne 0x6bb1
movq %r15, %rdi
leaq 0x1cc3(%rip), %rsi      # 0x8917
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1cb3(%rip), %rsi      # 0x892c
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1c90(%rip), %rsi      # 0x892e
callq 0x21a0
movq %r15, %rdi
leaq 0x1d07(%rip), %rsi      # 0x89b4
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
jmp 0x6fe4
movq 0x20(%rbx), %rdi
callq 0x305e
movl %eax, %r12d
leaq 0x10(%rsp), %rdi
callq 0x5266
movq %r15, %rdi
leaq 0x1be2(%rip), %rsi      # 0x88c1
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq %r15, %rdi
movq %r13, %rsi
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 %r15, %rdi
movq %rbp, %rsi
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
cmpl %eax, %r12d
jne 0x6cbf
movq %r15, %rdi
leaq 0x1bfb(%rip), %rsi      # 0x895d
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1ba5(%rip), %rsi      # 0x892c
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1b82(%rip), %rsi      # 0x892e
callq 0x21a0
movq %r15, %rdi
leaq 0x1bf9(%rip), %rsi      # 0x89b4
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
jmp 0x6fe4
movq 0x20(%rbx), %rdi
callq 0x3070
movl %eax, %r12d
leaq 0x10(%rsp), %rdi
callq 0x53f6
movq %r15, %rdi
leaq 0x1aa2(%rip), %rsi      # 0x888f
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq %r15, %rdi
movq %r13, %rsi
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 %r15, %rdi
movq %rbp, %rsi
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 0x3070
cmpl %eax, %r12d
jne 0x6dcd
movq %r15, %rdi
leaq 0x1ac0(%rip), %rsi      # 0x8930
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1a97(%rip), %rsi      # 0x892c
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1a74(%rip), %rsi      # 0x892e
callq 0x21a0
movq %r15, %rdi
leaq 0x1aeb(%rip), %rsi      # 0x89b4
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
jmp 0x6fe4
movq 0x20(%rbx), %rdi
callq 0x3070
movl %eax, %r12d
leaq 0x10(%rsp), %rdi
callq 0x5586
movq %r15, %rdi
leaq 0x19ac(%rip), %rsi      # 0x88a7
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
movq %r15, %rdi
movq %r13, %rsi
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 %r15, %rdi
movq %rbp, %rsi
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 0x3070
cmpl %eax, %r12d
jne 0x6edb
movq %r15, %rdi
leaq 0x19c8(%rip), %rsi      # 0x8946
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x305e
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1989(%rip), %rsi      # 0x892c
callq 0x21a0
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x3070
movq %r14, %rdi
movl %eax, %esi
callq 0x2290
movq %rax, %rdi
leaq 0x1966(%rip), %rsi      # 0x892e
callq 0x21a0
movq %r15, %rdi
leaq 0x19dd(%rip), %rsi      # 0x89b4
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
incl 0x74(%rbx)
movl 0xc(%rsp), %r14d
incl %r14d
jmp 0x6b82
cmpl $0x4, 0x74(%rbx)
jne 0x7015
movq 0x4fd7(%rip), %rdi      # 0xbfd8
leaq 0x196b(%rip), %rsi      # 0x8973
callq 0x21a0
movq %rax, %rdi
callq 0x22f8
leaq 0x10(%rsp), %rdi
callq 0x644c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
jmp 0x7044
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x644c
movq %rbx, %rdi
callq 0x22a0
nop