// File: gabryatfendor[P]SocietySimulator/src/map.cpp
// Function: printMap()
void printMap()
{
	for(int j=0;j<HEIGHT;j++)
	{
		for(int i=0;i<WIDTH;i++)
		{
			if (map[i][j].villagerHere)
			{
				if(map[i][j].kind == '-')//on a boat!!
				{
					cout << "\033[1;35mB\033[0m";
				}
				else
				{
					cout << "\033[1;35m@\033[0m";
				}
			}
			else
			{
				if(map[i][j].kind=='-')
				{
					cout << "\033[1;36m-\033[0m";
				}
				else if (map[i][j].kind=='^')
				{
					cout << "\033[1;31m^\033[0m";
				}
				else if (map[i][j].kind=='|')
				{
					cout << "\033[1;32m|\033[0m";
				}
				else if (map[i][j].kind=='c')
				{
					cout << "\033[1m@\033[0m";
				}
				else if (map[i][j].kind=='x')
				{
					map[i][j].usable++;
					if(map[i][j].usable>=100)
					{
						map[i][j].kind=map[i][j].origin;
					}
					cout << "x";
				}
				else
				{
					cout << "\033[1m"<<map[i][j].kind<<"\033[0m";
				}

			}
		}
		cout << "\n";
	}
	cout << "Fish: " << fish << "    Wood: " << wood << "    Food: " << food << "    Stone: " << stone << "\n";

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x14, -0x4(%rbp)
jge 0x4ec9
movl $0x0, -0x8(%rbp)
cmpl $0x50, -0x8(%rbp)
jge 0x4ea8
movslq -0x8(%rbp), %rcx
leaq 0x968b(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
testb $0x1, 0xa(%rax)
je 0x4c66
movslq -0x8(%rbp), %rcx
leaq 0x9665(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x4c4e
movq 0x9380(%rip), %rdi      # 0xdfc0
leaq 0x4413(%rip), %rsi      # 0x905a
callq 0x2220
jmp 0x4c61
movq 0x936b(%rip), %rdi      # 0xdfc0
leaq 0x440b(%rip), %rsi      # 0x9067
callq 0x2220
jmp 0x4e98
movslq -0x8(%rbp), %rcx
leaq 0x960f(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x4ca7
movq 0x932a(%rip), %rdi      # 0xdfc0
leaq 0x43d7(%rip), %rsi      # 0x9074
callq 0x2220
jmp 0x4e96
movslq -0x8(%rbp), %rcx
leaq 0x95ce(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %eax
cmpl $0x5e, %eax
jne 0x4ce8
movq 0x92e9(%rip), %rdi      # 0xdfc0
leaq 0x43a3(%rip), %rsi      # 0x9081
callq 0x2220
jmp 0x4e94
movslq -0x8(%rbp), %rcx
leaq 0x958d(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %eax
cmpl $0x7c, %eax
jne 0x4d29
movq 0x92a8(%rip), %rdi      # 0xdfc0
leaq 0x436f(%rip), %rsi      # 0x908e
callq 0x2220
jmp 0x4e92
movslq -0x8(%rbp), %rcx
leaq 0x954c(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %eax
cmpl $0x63, %eax
jne 0x4d6a
movq 0x9267(%rip), %rdi      # 0xdfc0
leaq 0x433b(%rip), %rsi      # 0x909b
callq 0x2220
jmp 0x4e90
movslq -0x8(%rbp), %rcx
leaq 0x950b(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
jne 0x4e40
movslq -0x8(%rbp), %rcx
leaq 0x94de(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movslq -0x8(%rbp), %rcx
leaq 0x94b5(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x64, 0x4(%rax)
jl 0x4e2b
movslq -0x8(%rbp), %rcx
leaq 0x948f(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movb (%rax), %cl
movslq -0x8(%rbp), %rdx
leaq 0x946d(%rip), %rax      # 0xe280
imulq $0xf0, %rdx, %rdx
addq %rdx, %rax
movslq -0x4(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x1(%rax)
movq 0x918e(%rip), %rdi      # 0xdfc0
leaq 0x426c(%rip), %rsi      # 0x90a5
callq 0x2220
jmp 0x4e8e
movq 0x9179(%rip), %rdi      # 0xdfc0
leaq 0x4259(%rip), %rsi      # 0x90a7
callq 0x2220
movq %rax, %rdi
movslq -0x8(%rbp), %rcx
leaq 0x941f(%rip), %rax      # 0xe280
imulq $0xf0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movsbl 0x1(%rax), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x41f3(%rip), %rsi      # 0x907c
callq 0x2220
jmp 0x4e90
jmp 0x4e92
jmp 0x4e94
jmp 0x4e96
jmp 0x4e98
jmp 0x4e9a
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x4be0
movq 0x9111(%rip), %rdi      # 0xdfc0
leaq 0x417b(%rip), %rsi      # 0x9031
callq 0x2220
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x4bcf
movq 0x90f0(%rip), %rdi      # 0xdfc0
leaq 0x41d5(%rip), %rsi      # 0x90ac
callq 0x2220
movq %rax, %rdi
leaq 0xe352(%rip), %rax      # 0x13238
movl (%rax), %esi
callq 0x23a0
movq %rax, %rdi
leaq 0x41bc(%rip), %rsi      # 0x90b3
callq 0x2220
movq %rax, %rdi
leaq 0xe32e(%rip), %rax      # 0x13234
movl (%rax), %esi
callq 0x23a0
movq %rax, %rdi
leaq 0x41a7(%rip), %rsi      # 0x90be
callq 0x2220
movq %rax, %rdi
leaq 0xe316(%rip), %rax      # 0x1323c
movl (%rax), %esi
callq 0x23a0
movq %rax, %rdi
leaq 0x4192(%rip), %rsi      # 0x90c9
callq 0x2220
movq %rax, %rdi
leaq 0xe2fa(%rip), %rax      # 0x13240
movl (%rax), %esi
callq 0x23a0
movq %rax, %rdi
leaq 0x40da(%rip), %rsi      # 0x9031
callq 0x2220
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)