// File: hobbitsyfeet[P]Turn/chart.cc
// Function: Chart::displayRange(int, int, int)
void Chart::displayRange(int centrePosX,int centrePosY, int radius){

  vector<vector<container> >::iterator row;
  vector<container>::iterator col;
  int dist;
  for(row = world.begin(); row < world.end() ; row++){
    for(col = row->begin(); col < row->end(); col++){
      dist = sqrt( ( (col->getPosX() - centrePosX)*(col->getPosX() - centrePosX) )
		   + 	 ( col->getPosY() - centrePosY)*(col->getPosY() - centrePosY) );



      if(getFogOfWar()){
	if(dist <= radius){
	  if(centrePosX == col->getPosX() && centrePosY == col->getPosY()){
	    cout<<"P ";
    }
    else if(col->checkAvailable() == true && canEnter( col->getPosX(),col->getPosY() ) == true){
      cout<<"p ";
    }
	  else{
	    if(col->getGeoType()=='-' || col->getGeoType() =='O')
	      cout<<' ';
	    else
	      col->displayType();
	    cout<<' ';
	  }
	}
	else
	  cout<<"- ";
      }
      else{
	if(centrePosX == col->getPosX() && centrePosY == col->getPosY())
	  cout<<"P ";

	else{
	  if(col->getGeoType()=='-' || col->getGeoType() =='O')
	    cout<<"  ";
	  else{
	    col->displayType();
	    cout<<' ';
	  }
	}
      }
    }
    cout<<endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xcbb0
leaq -0x28(%rbp), %rdi
callq 0xcbd0
movq -0x68(%rbp), %rdi
callq 0xcdc0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x68(%rbp), %rdi
callq 0xce30
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xcdf0
testb $0x1, %al
jne 0xc25a
jmp 0xc58d
leaq -0x20(%rbp), %rdi
callq 0xce60
movq %rax, %rdi
callq 0xce80
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xce60
movq %rax, %rdi
callq 0xcef0
movq %rax, -0x50(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xceb0
testb $0x1, %al
jne 0xc2a2
jmp 0xc566
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5a0
subl -0xc(%rbp), %eax
movl %eax, -0x74(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5a0
movl %eax, %ecx
movl -0x74(%rbp), %eax
subl -0xc(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x70(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5b0
subl -0x10(%rbp), %eax
movl %eax, -0x6c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5b0
movl -0x70(%rbp), %edi
movl %eax, %ecx
movl -0x6c(%rbp), %eax
subl -0x10(%rbp), %ecx
imull %ecx, %eax
addl %eax, %edi
callq 0x7db0
movq -0x68(%rbp), %rdi
cvttsd2si %xmm0, %eax
movl %eax, -0x2c(%rbp)
callq 0xc5d0
testb $0x1, %al
jne 0xc32e
jmp 0xc482
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xc46a
movl -0xc(%rbp), %eax
movl %eax, -0x78(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5a0
movl %eax, %ecx
movl -0x78(%rbp), %eax
cmpl %ecx, %eax
jne 0xc392
movl -0x10(%rbp), %eax
movl %eax, -0x7c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5b0
movl %eax, %ecx
movl -0x7c(%rbp), %eax
cmpl %ecx, %eax
jne 0xc392
movq 0xcc4f(%rip), %rdi      # 0x18fd0
leaq 0x64a6(%rip), %rsi      # 0x1282e
callq 0x3280
jmp 0xc468
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc000
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xc3ff
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5a0
movl %eax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5b0
movq -0x68(%rbp), %rdi
movl -0x80(%rbp), %esi
movl %eax, %edx
callq 0xc5f0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xc3ff
movq 0xcbdf(%rip), %rdi      # 0x18fd0
leaq 0x5ef3(%rip), %rsi      # 0x122eb
callq 0x3280
jmp 0xc466
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc1a0
movsbl %al, %eax
cmpl $0x2d, %eax
je 0xc431
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc1a0
movsbl %al, %eax
cmpl $0x4f, %eax
jne 0xc444
movq 0xcb98(%rip), %rdi      # 0x18fd0
movl $0x20, %esi
callq 0x3320
jmp 0xc455
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc1c0
movq 0xcb74(%rip), %rdi      # 0x18fd0
movl $0x20, %esi
callq 0x3320
jmp 0xc468
jmp 0xc47d
movq 0xcb5f(%rip), %rdi      # 0x18fd0
leaq 0x63b9(%rip), %rsi      # 0x12831
callq 0x3280
jmp 0xc550
movl -0xc(%rbp), %eax
movl %eax, -0x84(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5a0
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jne 0xc4e3
movl -0x10(%rbp), %eax
movl %eax, -0x88(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc5b0
movl %eax, %ecx
movl -0x88(%rbp), %eax
cmpl %ecx, %eax
jne 0xc4e3
movq 0xcafb(%rip), %rdi      # 0x18fd0
leaq 0x6352(%rip), %rsi      # 0x1282e
callq 0x3280
jmp 0xc54e
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc1a0
movsbl %al, %eax
cmpl $0x2d, %eax
je 0xc515
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc1a0
movsbl %al, %eax
cmpl $0x4f, %eax
jne 0xc52a
movq 0xcab4(%rip), %rdi      # 0x18fd0
leaq 0x6308(%rip), %rsi      # 0x1282b
callq 0x3280
jmp 0xc54c
leaq -0x28(%rbp), %rdi
callq 0xd010
movq %rax, %rdi
callq 0xc1c0
movq 0xca8e(%rip), %rdi      # 0x18fd0
movl $0x20, %esi
callq 0x3320
jmp 0xc54e
jmp 0xc550
jmp 0xc552
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xcf90
movq %rax, -0x58(%rbp)
jmp 0xc277
movq 0xca63(%rip), %rdi      # 0x18fd0
movq 0xca4c(%rip), %rsi      # 0x18fc0
callq 0x32b0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xcfd0
movq %rax, -0x60(%rbp)
jmp 0xc237
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)