// File: /workspace/github_cpp_makefile_star2_O1/arisKoutsou[P]oopproj/./src/grid/Grid.cpp
// Function: Grid::displayMap() const
void Grid :: displayMap() const {

  int columns = tiles[0].size();	// Get the size of the vector of tiles.
  int rows = tiles.size();		// Get the size of lines of the vector.

  cout << endl;
  // Draw the first line which is a wall...
  for (int i = 0; i < columns; i++) {
    cout << "+---";
  }
  cout << "+" << endl;

  for (int i = rows - 1; i >= 0 ; i--) {
    // Draw | H |   | ....
    for (int j = 0; j < columns; j++) {
      cout << "|";

      if (tiles[i][j].hasLiving()) {
	cout << " H ";
      } else if (tiles[i][j].hasMarket()) {
	cout << " M ";
      } else if (tiles[i][j].isNonAccessible()) {
	cout << "###";
      } else if (tiles[i][j].isCommon()) {
	cout << " C ";
      } else {
	cout << "   ";
      }

    }
    cout << "|" << endl;

    // Draw wall...
    for (int i = 0; i < columns; i++) {
      cout << "+---";
    }
    cout << "+" << endl;
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
movq 0x10(%rdi), %rdx
sarq $0x3, %rcx
movabsq $-0x3333333333333333, %r13 # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %r13
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rax
movq %rax, 0x8(%rsp)
movq 0x1e625(%rip), %r14     # 0x24fc0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
testl %r13d, %r13d
jle 0x69ec
movq 0x1e5f2(%rip), %r15     # 0x24fc0
leaq 0x14a22(%rip), %r12     # 0x1b3f7
movl %r13d, %ebp
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x42f0
decl %ebp
jne 0x69d8
leaq 0x148a6(%rip), %rsi     # 0x1b299
movl $0x1, %edx
movq %r14, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq 0x8(%rsp), %rcx
testl %ecx, %ecx
jle 0x6b9d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andq %rax, %rcx
movq %r13, %rdx
andq %rax, %rdx
movq %rdx, 0x18(%rsp)
leaq 0x147b1(%rip), %r15     # 0x1b1ff
movq %r13, 0x20(%rsp)
movq %rcx, 0x8(%rsp)
leaq -0x1(%rcx), %rax
movq %rax, 0x10(%rsp)
testl %r13d, %r13d
jle 0x6af2
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %r13
movq 0x18(%rsp), %rbp
xorl %r12d, %r12d
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x42f0
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rax
leaq (%rax,%r12), %rcx
addq $0x8, %rcx
leaq 0x1495a(%rip), %rsi     # 0x1b3fc
cmpq (%rcx), %rcx
jne 0x6adc
cmpq $0x0, 0x20(%rax,%r12)
leaq 0x1494c(%rip), %rsi     # 0x1b400
jne 0x6adc
leaq (%rax,%r12), %rcx
cmpb $0x0, (%rcx)
leaq 0x14940(%rip), %rsi     # 0x1b404
jne 0x6adc
cmpb $0x0, 0x1(%rax,%r12)
leaq 0x14935(%rip), %rsi     # 0x1b408
jne 0x6adc
leaq 0x14930(%rip), %rsi     # 0x1b40c
movl $0x3, %edx
movq %r14, %rdi
callq 0x42f0
addq $0x28, %r12
decq %rbp
jne 0x6a7b
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq 0x20(%rsp), %r13
movl %r13d, %ebp
testl %r13d, %r13d
leaq 0x148bc(%rip), %r12     # 0x1b3f7
jle 0x6b51
movl $0x4, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x42f0
decl %ebp
jne 0x6b3d
movl $0x1, %edx
movq %r14, %rdi
leaq 0x14739(%rip), %rsi     # 0x1b299
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
cmpq $0x1, 0x8(%rsp)
movq 0x10(%rsp), %rcx
jg 0x6a53
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq