// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9ac0
movq %rax, %rdi
callq 0x9d20
movq -0x28(%rbp), %rdi
movl %eax, -0xc(%rbp)
addq $0x8, %rdi
callq 0x9d50
movl %eax, -0x10(%rbp)
movq 0x36a5d(%rip), %rdi     # 0x3ffc0
movq 0x36a36(%rip), %rsi     # 0x3ffa0
callq 0x5330
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x959c
movq 0x36a3b(%rip), %rdi     # 0x3ffc0
leaq 0x24e4b(%rip), %rsi     # 0x2e3d7
callq 0x52f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9576
movq 0x36a1d(%rip), %rdi     # 0x3ffc0
leaq 0x24cbf(%rip), %rsi     # 0x2e269
callq 0x52f0
movq %rax, %rdi
movq 0x369e7(%rip), %rsi     # 0x3ffa0
callq 0x5330
movl -0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x97a5
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9726
movq 0x369d5(%rip), %rdi     # 0x3ffc0
leaq 0x24bdd(%rip), %rsi     # 0x2e1cf
callq 0x52f0
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movslq -0x18(%rbp), %rsi
callq 0x9ac0
movq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9ae0
movq %rax, %rdi
callq 0x8f50
testb $0x1, %al
jne 0x9622
jmp 0x963a
movq 0x36997(%rip), %rdi     # 0x3ffc0
leaq 0x24dac(%rip), %rsi     # 0x2e3dc
callq 0x52f0
jmp 0x9716
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movslq -0x18(%rbp), %rsi
callq 0x9ac0
movq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9ae0
movq %rax, %rdi
callq 0x8f80
testb $0x1, %al
jne 0x9665
jmp 0x967d
movq 0x36954(%rip), %rdi     # 0x3ffc0
leaq 0x24d6d(%rip), %rsi     # 0x2e3e0
callq 0x52f0
jmp 0x9714
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movslq -0x18(%rbp), %rsi
callq 0x9ac0
movq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9ae0
movq %rax, %rdi
callq 0x8f30
testb $0x1, %al
jne 0x96a8
jmp 0x96bd
movq 0x36911(%rip), %rdi     # 0x3ffc0
leaq 0x24d2e(%rip), %rsi     # 0x2e3e4
callq 0x52f0
jmp 0x9712
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movslq -0x18(%rbp), %rsi
callq 0x9ac0
movq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9ae0
movq %rax, %rdi
callq 0x8fa0
testb $0x1, %al
jne 0x96e8
jmp 0x96fd
movq 0x368d1(%rip), %rdi     # 0x3ffc0
leaq 0x24cf2(%rip), %rsi     # 0x2e3e8
callq 0x52f0
jmp 0x9710
movq 0x368bc(%rip), %rdi     # 0x3ffc0
leaq 0x24ce1(%rip), %rsi     # 0x2e3ec
callq 0x52f0
jmp 0x9712
jmp 0x9714
jmp 0x9716
jmp 0x9718
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x95d8
movq 0x36893(%rip), %rdi     # 0x3ffc0
leaq 0x24a9b(%rip), %rsi     # 0x2e1cf
callq 0x52f0
movq %rax, %rdi
movq 0x3685d(%rip), %rsi     # 0x3ffa0
callq 0x5330
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9775
movq 0x36862(%rip), %rdi     # 0x3ffc0
leaq 0x24c72(%rip), %rsi     # 0x2e3d7
callq 0x52f0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x974f
movq 0x36844(%rip), %rdi     # 0x3ffc0
leaq 0x24ae6(%rip), %rsi     # 0x2e269
callq 0x52f0
movq %rax, %rdi
movq 0x3680e(%rip), %rsi     # 0x3ffa0
callq 0x5330
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x95c7
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)