// File: arisKoutsou[P]oopproj/./src/game_utils.cpp
// Function: createHeroes(int)
void createHeroes(int numberOfHeroes) {
  bool warriorSelected = false;
  bool sorcererSelected = false;
  bool paladinSelected = false;
  for (int i = 0; i != numberOfHeroes; ++i) {
    cout << "Please enter a class for hero " << i + 1
	 << " ( possible classes are ";
    if (!warriorSelected) cout << "Warrior ";
    if (!sorcererSelected) cout << "Sorcerer ";
    if (!paladinSelected) cout << "Paladin ";
    cout << ")" << endl << endl << "> ";
    string heroClass;
    getline(cin, heroClass);
    transform(heroClass.begin(), heroClass.end(),
	      heroClass.begin(), :: tolower);
    if (!(heroClass == "warrior"
	  || heroClass == "paladin"
	  || heroClass == "sorcerer")
	) {
      cout << endl <<  "That's not a valid class!" << endl << endl;
      --i;
      continue;
    }

    if (heroClass == "warrior" && warriorSelected) {
      cout << endl
	   << "Warrior is already selected. Please select one of the "
	   << "available classes" << endl << endl;
      --i;
      continue;
    }
    if (heroClass == "sorcerer" && sorcererSelected) {
      cout << endl
	   << "Sorcerer is already selected. Please selecet one of the "
	   << "available classes" << endl << endl;
      --i;
      continue;
    }
    if (heroClass == "paladin" && paladinSelected) {
      cout << endl
	   << "Paladin is already selected. Please select one of the "
	   << "available classes" << endl << endl;
      --i;
      continue;
    }

    cout << endl << "Please enter a name for your hero"
	 << endl << endl << "> ";
    string name;
    getline(cin, name);
    cout << endl;
    Hero* hero;
    if (heroClass == "warrior") {
      warriorSelected = true;
      hero = new Warrior(gameGrid, name);
    } else if (heroClass == "sorcerer") {
      sorcererSelected = true;
      hero = new Sorcerer(gameGrid, name);
    } else if (heroClass == "paladin") {
      paladinSelected = true;
      hero = new Paladin(gameGrid, name);
    }

    heroes.push_back(hero);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movl %edi, -0x4(%rbp)
movb $0x0, -0x5(%rbp)
movb $0x0, -0x6(%rbp)
movb $0x0, -0x7(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x4(%rbp), %eax
je 0x100a4
movq 0x3084c(%rip), %rdi     # 0x3ffc0
leaq 0x1f0f4(%rip), %rsi     # 0x2e86f
callq 0x52f0
movq %rax, %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x5540
movq %rax, %rdi
leaq 0x1f0f6(%rip), %rsi     # 0x2e88e
callq 0x52f0
testb $0x1, -0x5(%rbp)
jne 0xf7b6
movq 0x30816(%rip), %rdi     # 0x3ffc0
leaq 0x1f0f6(%rip), %rsi     # 0x2e8a7
callq 0x52f0
testb $0x1, -0x6(%rbp)
jne 0xf7cf
movq 0x307fd(%rip), %rdi     # 0x3ffc0
leaq 0x1f0e6(%rip), %rsi     # 0x2e8b0
callq 0x52f0
testb $0x1, -0x7(%rbp)
jne 0xf7e8
movq 0x307e4(%rip), %rdi     # 0x3ffc0
leaq 0x1f0d7(%rip), %rsi     # 0x2e8ba
callq 0x52f0
movq 0x307d1(%rip), %rdi     # 0x3ffc0
leaq 0x1edb5(%rip), %rsi     # 0x2e5ab
callq 0x52f0
movq %rax, %rdi
movq 0x3079b(%rip), %rsi     # 0x3ffa0
movq %rsi, -0x118(%rbp)
callq 0x5330
movq -0x118(%rbp), %rsi
movq %rax, %rdi
callq 0x5330
movq %rax, %rdi
leaq 0x1e812(%rip), %rsi     # 0x2e03c
callq 0x52f0
leaq -0x30(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x5460
movq -0x110(%rbp), %rsi
movq 0x3078b(%rip), %rdi     # 0x3ffd8
callq 0x5070
jmp 0xf854
leaq -0x30(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x5280
movq -0x128(%rbp), %rdi
movq %rax, -0x48(%rbp)
callq 0x5190
movq -0x128(%rbp), %rdi
movq %rax, -0x50(%rbp)
callq 0x5280
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq 0x3072d(%rip), %rcx     # 0x3ffc8
callq 0x7e00
movq %rax, -0x120(%rbp)
jmp 0xf8a9
movq -0x120(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x1f008(%rip), %rsi     # 0x2e8c3
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x129(%rbp)
jmp 0xf8cc
movb -0x129(%rbp), %al
testb $0x1, %al
jne 0xf9bb
jmp 0xf8dc
leaq 0x1efe8(%rip), %rsi     # 0x2e8cb
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x12a(%rbp)
jmp 0xf8f4
movb -0x12a(%rbp), %al
testb $0x1, %al
jne 0xf9bb
jmp 0xf904
leaq 0x1efc8(%rip), %rsi     # 0x2e8d3
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x12b(%rbp)
jmp 0xf91c
movb -0x12b(%rbp), %al
testb $0x1, %al
jne 0xf9bb
jmp 0xf92c
movq 0x3068d(%rip), %rdi     # 0x3ffc0
movq 0x30666(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x138(%rbp)
jmp 0xf948
movq -0x138(%rbp), %rdi
leaq 0x1ef86(%rip), %rsi     # 0x2e8dc
callq 0x52f0
movq %rax, -0x140(%rbp)
jmp 0xf964
movq -0x140(%rbp), %rdi
movq 0x3062e(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x148(%rbp)
jmp 0xf980
movq -0x148(%rbp), %rdi
movq 0x30612(%rip), %rsi     # 0x3ffa0
callq 0x5330
jmp 0xf995
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x4, -0x64(%rbp)
jmp 0x10069
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x10099
leaq 0x1ef01(%rip), %rsi     # 0x2e8c3
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x149(%rbp)
jmp 0xf9d3
movb -0x149(%rbp), %al
testb $0x1, %al
jne 0xf9e2
jmp 0xfa86
testb $0x1, -0x5(%rbp)
je 0xfa86
movq 0x305cd(%rip), %rdi     # 0x3ffc0
movq 0x305a6(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x158(%rbp)
jmp 0xfa08
movq -0x158(%rbp), %rdi
leaq 0x1eee0(%rip), %rsi     # 0x2e8f6
callq 0x52f0
movq %rax, -0x160(%rbp)
jmp 0xfa24
movq -0x160(%rbp), %rdi
leaq 0x1eefb(%rip), %rsi     # 0x2e92d
callq 0x52f0
movq %rax, -0x168(%rbp)
jmp 0xfa40
movq -0x168(%rbp), %rdi
movq 0x30552(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x170(%rbp)
jmp 0xfa5c
movq -0x170(%rbp), %rdi
movq 0x30536(%rip), %rsi     # 0x3ffa0
callq 0x5330
jmp 0xfa71
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x4, -0x64(%rbp)
jmp 0x10069
leaq 0x1ee46(%rip), %rsi     # 0x2e8d3
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x171(%rbp)
jmp 0xfa9e
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0xfaad
jmp 0xfb51
testb $0x1, -0x6(%rbp)
je 0xfb51
movq 0x30502(%rip), %rdi     # 0x3ffc0
movq 0x304db(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x180(%rbp)
jmp 0xfad3
movq -0x180(%rbp), %rdi
leaq 0x1ee5e(%rip), %rsi     # 0x2e93f
callq 0x52f0
movq %rax, -0x188(%rbp)
jmp 0xfaef
movq -0x188(%rbp), %rdi
leaq 0x1ee30(%rip), %rsi     # 0x2e92d
callq 0x52f0
movq %rax, -0x190(%rbp)
jmp 0xfb0b
movq -0x190(%rbp), %rdi
movq 0x30487(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x198(%rbp)
jmp 0xfb27
movq -0x198(%rbp), %rdi
movq 0x3046b(%rip), %rsi     # 0x3ffa0
callq 0x5330
jmp 0xfb3c
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x4, -0x64(%rbp)
jmp 0x10069
leaq 0x1ed73(%rip), %rsi     # 0x2e8cb
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x199(%rbp)
jmp 0xfb69
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0xfb78
jmp 0xfc1c
testb $0x1, -0x7(%rbp)
je 0xfc1c
movq 0x30437(%rip), %rdi     # 0x3ffc0
movq 0x30410(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x1a8(%rbp)
jmp 0xfb9e
movq -0x1a8(%rbp), %rdi
leaq 0x1edcc(%rip), %rsi     # 0x2e978
callq 0x52f0
movq %rax, -0x1b0(%rbp)
jmp 0xfbba
movq -0x1b0(%rbp), %rdi
leaq 0x1ed65(%rip), %rsi     # 0x2e92d
callq 0x52f0
movq %rax, -0x1b8(%rbp)
jmp 0xfbd6
movq -0x1b8(%rbp), %rdi
movq 0x303bc(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x1c0(%rbp)
jmp 0xfbf2
movq -0x1c0(%rbp), %rdi
movq 0x303a0(%rip), %rsi     # 0x3ffa0
callq 0x5330
jmp 0xfc07
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x4, -0x64(%rbp)
jmp 0x10069
movq 0x3039d(%rip), %rdi     # 0x3ffc0
movq 0x30376(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x1c8(%rbp)
jmp 0xfc38
movq -0x1c8(%rbp), %rdi
leaq 0x1ed69(%rip), %rsi     # 0x2e9af
callq 0x52f0
movq %rax, -0x1d0(%rbp)
jmp 0xfc54
movq -0x1d0(%rbp), %rdi
movq 0x3033e(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x1d8(%rbp)
jmp 0xfc70
movq -0x1d8(%rbp), %rdi
movq 0x30322(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, -0x1e0(%rbp)
jmp 0xfc8c
movq -0x1e0(%rbp), %rdi
leaq 0x1e3a2(%rip), %rsi     # 0x2e03c
callq 0x52f0
jmp 0xfca1
leaq -0x88(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x5460
movq -0x1e8(%rbp), %rsi
movq 0x30316(%rip), %rdi     # 0x3ffd8
callq 0x5070
jmp 0xfcc9
movq 0x302f0(%rip), %rdi     # 0x3ffc0
movq 0x302c9(%rip), %rsi     # 0x3ffa0
callq 0x5330
jmp 0xfcde
leaq 0x1ebde(%rip), %rsi     # 0x2e8c3
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x1e9(%rbp)
jmp 0xfcf6
movb -0x1e9(%rbp), %al
testb $0x1, %al
jne 0xfd05
jmp 0xfe0b
movb $0x1, -0x5(%rbp)
movl $0x168, %edi            # imm = 0x168
callq 0x5300
movq %rax, -0x1f8(%rbp)
jmp 0xfd1c
movb $0x1, -0xb1(%rbp)
movq 0x308b6(%rip), %rax     # 0x405e0
movq %rax, -0x200(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5120
jmp 0xfd46
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdi
movq %rsp, %rax
movl $0x64, 0x10(%rax)
movl $0x64, 0x8(%rax)
movl $0xc8, (%rax)
leaq -0xb0(%rbp), %rdx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x1e685(%rip), %xmm0    # 0x2e408
movl %r8d, %ecx
callq 0x2b6a0
jmp 0xfd8d
movq -0x1f8(%rbp), %rax
movb $0x0, -0xb1(%rbp)
movq %rax, -0x90(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x55d0
jmp 0x10041
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1008d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xfdea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x55d0
testb $0x1, -0xb1(%rbp)
jne 0xfdf5
jmp 0xfe06
movq -0x1f8(%rbp), %rdi
movl $0x168, %esi            # imm = 0x168
callq 0x5310
jmp 0x1008d
leaq 0x1eac1(%rip), %rsi     # 0x2e8d3
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x201(%rbp)
jmp 0xfe23
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0xfe32
jmp 0xff27
movb $0x1, -0x6(%rbp)
movl $0x168, %edi            # imm = 0x168
callq 0x5300
movq %rax, -0x210(%rbp)
jmp 0xfe49
movb $0x1, -0xd9(%rbp)
movq 0x30789(%rip), %rax     # 0x405e0
movq %rax, -0x218(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5120
jmp 0xfe73
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdi
movq %rsp, %rax
movl $0x64, 0x10(%rax)
movl $0x64, 0x8(%rax)
movl $0xc8, (%rax)
leaq -0xd8(%rbp), %rdx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x1e558(%rip), %xmm0    # 0x2e408
movl %r8d, %ecx
callq 0x2b3e0
jmp 0xfeba
movq -0x210(%rbp), %rax
movb $0x0, -0xd9(%rbp)
movq %rax, -0x90(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x55d0
jmp 0x1003f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xff06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x55d0
testb $0x1, -0xd9(%rbp)
jne 0xff11
jmp 0xff22
movq -0x210(%rbp), %rdi
movl $0x168, %esi            # imm = 0x168
callq 0x5310
jmp 0x1008d
leaq 0x1e99d(%rip), %rsi     # 0x2e8cb
leaq -0x30(%rbp), %rdi
callq 0x8e10
movb %al, -0x219(%rbp)
jmp 0xff3f
movb -0x219(%rbp), %al
testb $0x1, %al
jne 0xff4e
jmp 0x1003d
movb $0x1, -0x7(%rbp)
movl $0x168, %edi            # imm = 0x168
callq 0x5300
movq %rax, -0x228(%rbp)
jmp 0xff65
movb $0x1, -0x101(%rbp)
movq 0x3066d(%rip), %rax     # 0x405e0
movq %rax, -0x230(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5120
jmp 0xff8f
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdi
movq %rsp, %rax
movl $0x64, 0x10(%rax)
movl $0x64, 0x8(%rax)
movl $0xc8, (%rax)
leaq -0x100(%rbp), %rdx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x1e43c(%rip), %xmm0    # 0x2e408
movl %r8d, %ecx
callq 0x2b960
jmp 0xffd6
movq -0x228(%rbp), %rax
movb $0x0, -0x101(%rbp)
movq %rax, -0x90(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x55d0
jmp 0x1003d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1001f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x55d0
testb $0x1, -0x101(%rbp)
jne 0x1002a
jmp 0x1003b
movq -0x228(%rbp), %rdi
movl $0x168, %esi            # imm = 0x168
callq 0x5310
jmp 0x1008d
jmp 0x1003f
jmp 0x10041
leaq 0x302e8(%rip), %rdi     # 0x40330
leaq -0x90(%rbp), %rsi
callq 0x13640
jmp 0x10056
leaq -0x88(%rbp), %rdi
callq 0x55d0
movl $0x0, -0x64(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x55d0
movl -0x64(%rbp), %eax
testl %eax, %eax
je 0x1007d
jmp 0x1007b
jmp 0x1007f
jmp 0x1007f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf761
leaq -0x88(%rbp), %rdi
callq 0x55d0
leaq -0x30(%rbp), %rdi
callq 0x55d0
jmp 0x100ad
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5550
nopw %cs:(%rax,%rax)