// File: AngelPn[P]L5R-card_game/src/Player.cpp
// Function: Player::Player(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Player::Player(const std::string &name){
	this->name = name;
	list<GreenCard*>* ptr = deck.createFateDeck();
	fateDeck= new list<GreenCard*>(*ptr);  //fateDeck is pointer to a new list of pointers which refer to the green cards in deck
	deck.deckShuffler(fateDeck);

	list<BlackCard*>* ptr1 = deck.createDynastyDeck();
	dynastyDeck = new list<BlackCard*>(*ptr1); //dynastyDeck is pointer to a new list of pointers which refer to the black cards in deck
	deck.deckShuffler(dynastyDeck);

	for(int i=0; i< NO_HAND; i++){
		hand.push_back(fateDeck->front());
		fateDeck->pop_front();
  }

	holdings.push_back(new Stronghold);
	money = holdings[0]->initialMoney();
	roundMoney = money;
	numberOfProvinces= NO_PROVINCES;

	for(int i=0; i< numberOfProvinces; i++){
		provinces.push_back(dynastyDeck->front());
	    dynastyDeck->pop_front();
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
callq 0x47d0
movq -0x58(%rbp), %rdi
addq $0x20, %rdi
movq %rdi, -0x80(%rbp)
callq 0x7bf0
movq -0x58(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0x78(%rbp)
callq 0x13440
movq -0x58(%rbp), %rdi
addq $0x50, %rdi
movq %rdi, -0x70(%rbp)
callq 0x13460
movq -0x58(%rbp), %rdi
addq $0x68, %rdi
movq %rdi, -0x68(%rbp)
callq 0x13480
movq -0x58(%rbp), %rdi
addq $0x88, %rdi
movq %rdi, -0x60(%rbp)
callq 0x78a0
movq -0x58(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0x50(%rbp)
callq 0x42d0
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4030
jmp 0xf455
movq -0x88(%rbp), %rdi
callq 0x4a20
movq %rax, -0x90(%rbp)
jmp 0xf46a
movq -0x90(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x18, %edi
callq 0x4210
movq %rax, -0x98(%rbp)
jmp 0xf488
movq -0x98(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x134a0
jmp 0xf49a
movq -0x88(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rax, 0x10(%rdi)
movq 0x10(%rdi), %rsi
callq 0x6670
jmp 0xf4b7
movq -0x88(%rbp), %rdi
callq 0x56b0
movq %rax, -0xa0(%rbp)
jmp 0xf4cc
movq -0xa0(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x18, %edi
callq 0x4210
movq %rax, -0xa8(%rbp)
jmp 0xf4ea
movq -0xa8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x13560
jmp 0xf4fc
movq -0x88(%rbp), %rdi
movq -0xa8(%rbp), %rax
movq %rax, 0x18(%rdi)
movq 0x18(%rdi), %rsi
callq 0x6500
jmp 0xf519
movl $0x0, -0x34(%rbp)
cmpl $0x6, -0x34(%rbp)
jge 0xf5c9
movq -0x88(%rbp), %rax
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, -0xb0(%rbp)
movq 0x10(%rax), %rdi
callq 0x13620
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0x7c10
jmp 0xf559
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x13650
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xf520
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xf6f8
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x18, %esi
callq 0x4220
jmp 0xf6f8
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x18, %esi
callq 0x4220
jmp 0xf6f8
movq -0x88(%rbp), %rax
addq $0x38, %rax
movq %rax, -0xc0(%rbp)
movl $0x50, %edi
callq 0x4210
movq %rax, -0xb8(%rbp)
jmp 0xf5ee
movq -0xb8(%rbp), %rdi
callq 0x136b0
jmp 0xf5fc
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x13680
jmp 0xf619
movq -0x88(%rbp), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13770
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
movl %eax, -0xc4(%rbp)
jmp 0xf641
movq -0x88(%rbp), %rax
movl -0xc4(%rbp), %ecx
movl %ecx, 0xa0(%rax)
movl 0xa0(%rax), %ecx
movl %ecx, 0xa4(%rax)
movl $0x4, 0x80(%rax)
movl $0x0, -0x44(%rbp)
movq -0x88(%rbp), %rcx
movl -0x44(%rbp), %eax
cmpl 0x80(%rcx), %eax
jge 0xf6ef
movq -0x88(%rbp), %rax
movq %rax, %rcx
addq $0x88, %rcx
movq %rcx, -0xd0(%rbp)
movq 0x18(%rax), %rdi
callq 0x13790
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0x78c0
jmp 0xf6b5
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x137c0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xf671
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x50, %esi
callq 0x4220
jmp 0xf6f8
addq $0xd0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x4160
movq -0x60(%rbp), %rdi
callq 0x7b90
movq -0x68(%rbp), %rdi
callq 0x137f0
movq -0x70(%rbp), %rdi
callq 0x13850
movq -0x78(%rbp), %rdi
callq 0x138b0
movq -0x80(%rbp), %rdi
callq 0x7ee0
movq -0x58(%rbp), %rdi
callq 0x4860
movq -0x18(%rbp), %rdi
callq 0x4340