// File: /workspace/github_cpp_makefile_star2_O2/hobbitsyfeet[P]Turn/main.cc
// Function: main
int main(){

  //took out because worlds are now player-dependent so no need to go here
  // Chart worlds;
  Turn playerTurn;
  string option;
  int i;//initialize i for importance to keep value from for loop
  int temp;

  //start
  welcome("banners/banner.txt");
  cout<<"How many players?";
  cin>>temp;

  const int numPlayers = temp;

  //clear screen<< turn
  cout << "\x1B[2J\x1B[H";
  welcome("banners/banner.txt");

  //create array of number of players
  string *playerList = new string[numPlayers];

  //place players into array
  for( i = 0;  i< numPlayers; i++){
    cout<<"player"<<(i+1)<<',';
    playerList[i] = getPlayer();
  }

  //clear screen<< turn
  cout << "\x1B[2J\x1B[H";
  welcome("banners/banner.txt");

  //cout<<entering run
  do{
    for( i = 0;  i< numPlayers; i++)
      playerTurn.run(playerList[i]);
    if(numPlayers != 1){
      cout<<"continue?\n";
      cin>>option;
    }
  }
  while(option == "yes");

  delete [] playerList;
  cout<<"Good Bye!";
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq -0x248(%rbp), %rdi
callq 0x2c64
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x6a52(%rip), %rsi      # 0x9038
leaq -0xc8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x2dd8
leaq -0xc8(%rbp), %rdi
callq 0x28f1
leaq -0xc8(%rbp), %rdi
callq 0x2100
movq 0xb9b8(%rip), %rdi      # 0xdfd0
leaq 0x6a2c(%rip), %rsi      # 0x904b
callq 0x21c0
movq 0xb9b5(%rip), %rdi      # 0xdfe0
leaq -0x3c(%rbp), %rsi
callq 0x2140
movslq -0x3c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0xb98d(%rip), %rdi      # 0xdfd0
leaq 0x6a13(%rip), %rsi      # 0x905d
callq 0x21c0
leaq 0x69e2(%rip), %rsi      # 0x9038
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x2dd8
leaq -0xa8(%rbp), %rdi
callq 0x28f1
leaq -0xa8(%rbp), %rdi
callq 0x2100
movq -0x38(%rbp), %rcx
movq %rcx, %rbx
shlq $0x5, %rbx
leaq 0x8(%rbx), %rax
testl %ecx, %ecx
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
testl %eax, %eax
je 0x26cf
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %rbx
jne 0x26b9
movq -0x30(%rbp), %rax
leaq 0x8(%rax), %r13
xorl %r14d, %r14d
movq -0x38(%rbp), %rax
testl %eax, %eax
movl $0x0, %ebx
cmovgl %eax, %ebx
pushq $0x2c
popq %r15
leaq -0x88(%rbp), %r12
movq %r13, -0x48(%rbp)
cmpq %r14, %rbx
je 0x274a
movq 0xb8cd(%rip), %rdi      # 0xdfd0
leaq 0x695b(%rip), %rsi      # 0x9065
callq 0x21c0
leal 0x1(%r14), %esi
movq %rax, %rdi
callq 0x22f0
movq %rax, %rdi
movl %r15d, %esi
callq 0x2200
movq %r12, %rdi
callq 0x29e4
movq %r13, %rdi
movq %r12, %rsi
callq 0x2210
movq %r12, %rdi
callq 0x2100
addq $0x20, %r13
incq %r14
jmp 0x26f7
movq 0xb87f(%rip), %rdi      # 0xdfd0
leaq 0x6905(%rip), %rsi      # 0x905d
callq 0x21c0
leaq 0x68d4(%rip), %rsi      # 0x9038
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x2dd8
leaq -0x68(%rbp), %rdi
callq 0x28f1
leaq -0x68(%rbp), %rdi
callq 0x2100
xorl %r14d, %r14d
leaq -0xe8(%rbp), %r15
leaq -0x108(%rbp), %r12
leaq -0x248(%rbp), %r13
cmpq %rbx, %r14
jne 0x27e6
cmpl $0x1, -0x38(%rbp)
je 0x27cb
movq 0xb820(%rip), %rdi      # 0xdfd0
leaq 0x68b5(%rip), %rsi      # 0x906c
callq 0x21c0
movq 0xb81d(%rip), %rdi      # 0xdfe0
movq %r15, %rsi
callq 0x2220
movq %r15, %rdi
leaq 0x68a2(%rip), %rsi      # 0x9077
callq 0x2e13
movl $0x0, %r14d
testb %al, %al
jne 0x279e
jmp 0x2811
movq %r14, %rsi
shlq $0x5, %rsi
addq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x2250
movq %r13, %rdi
movq %r12, %rsi
callq 0x4e30
movq %r12, %rdi
callq 0x2100
incq %r14
jmp 0x279e
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, %r14
shlq $0x5, %r14
leaq 0x8(%r14), %rbx
testq %rax, %rax
je 0x283f
movq -0x30(%rbp), %r15
addq $-0x18, %r15
leaq (%r15,%r14), %rdi
callq 0x2100
addq $-0x20, %r14
jne 0x2830
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x2360
movq 0xb77e(%rip), %rdi      # 0xdfd0
leaq 0x6822(%rip), %rsi      # 0x907b
callq 0x21c0
leaq -0xe8(%rbp), %rdi
callq 0x2100
leaq -0x248(%rbp), %rdi
callq 0x2e24
xorl %eax, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x28c5
jmp 0x28ce
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x28c5
jmp 0x28ce
jmp 0x28ce
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
jmp 0x28c5
jmp 0x28ce
jmp 0x28ce
jmp 0x28ce
jmp 0x28ce
jmp 0x28ce
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x2100
jmp 0x28d1
jmp 0x28ce
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x2100
leaq -0x248(%rbp), %rdi
callq 0x2e24
movq %rbx, %rdi
callq 0x2300