// File: whitefusion[P]Jaipur_cardgame-/Game.cpp
// Function: Game::play_a_round()
void Game::play_a_round(){
    int curr = getCurrPlayer();
    int next;
    if (curr == 1)
        next = 2;
    else 
        next = 1;

    while(!RoundTermination()){
        display(getPlayer(curr));
        play_a_turn(getPlayer(curr));
        int temp = curr;
        curr = next;
        next = temp;
        if(curr == 1){
            int currTurn = getTurn();
            setTurn(++currTurn);
        }
    }

    cout << endl;
    cout << "Points before assiging CAMEL token: " << "player " << getPlayer(1).getName() << "---" <<  p1.getPoints(2);
    cout << "; " << "player " << getPlayer(2).getName() << "---" << p2.getPoints(2) << endl;

    cout << "CAMEL numbers: " << "player " << getPlayer(1).getName() << "---" << p1.getSize(1);
    cout << "; " << "player " << getPlayer(2).getName() << "---" << p2.getSize(1) << endl;



    //winning  camel token
    if (p1.getSize(1) > p2.getSize(1)){
        p1.addPoint(0,5);
        p1.addPoint(2,5);
    }
    else{
        p2.addPoint(0,5);
        p2.addPoint(2,5);
    }

    cout << "Points after assiging CAMEL token: " << "player " << getPlayer(1).getName() << "---" <<  p1.getPoints(2);
    cout << "; " << "player " << getPlayer(2).getName() << "---" << p2.getPoints(2) << endl;

    cout << "Bonus token #: " << "player " << getPlayer(1).getName() << "---" <<  p1.getBToken();
    cout << "; " << "player " << getPlayer(2).getName() << "---" << p2.getBToken() << endl;

    cout << "Goods token #: " << "player " << getPlayer(1).getName() << "---" <<  p1.getGToken();
    cout << "; " << "player " << getPlayer(2).getName() << "---" << p2.getGToken() << endl;

    //cout << "Winner is: " << getPlayer(roundWinner()).getName() << endl; 

    // winning seal
    if (roundWinner() == 1)
        p1.addPoint(3,1);
    else 
        p2.addPoint(3,1);

    setCurrPlayer(roundWinner());

    int currRound = getRound();
    setRound(++currRound);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x1bc30
movl %eax, -0xc(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x194a1
movl $0x2, -0x10(%rbp)
jmp 0x194a8
movl $0x1, -0x10(%rbp)
jmp 0x194aa
movq -0x178(%rbp), %rdi
callq 0x19fe0
xorb $-0x1, %al
testb $0x1, %al
jne 0x194be
jmp 0x1953b
movq -0x178(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4d80
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0x1a0c0
movq -0x178(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4d80
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0x1a190
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x19536
movq -0x178(%rbp), %rdi
callq 0x1bc50
movq -0x178(%rbp), %rdi
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x18(%rbp)
callq 0x19270
jmp 0x194aa
movq 0x11a8e(%rip), %rdi     # 0x2afd0
movq %rdi, -0x198(%rbp)
movq 0x11a70(%rip), %rsi     # 0x2afc0
callq 0x2240
movq -0x198(%rbp), %rdi
leaq 0x5425(%rip), %rsi      # 0x1e988
callq 0x2200
movq %rax, %rdi
leaq 0x543b(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x190(%rbp)
movl $0x1, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x14700
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x21d0
movq %rax, -0x180(%rbp)
jmp 0x195be
movq -0x180(%rbp), %rdi
leaq 0x53e9(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x1a0(%rbp)
jmp 0x195da
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
callq 0x149f0
movl %eax, -0x1a4(%rbp)
jmp 0x195f7
movl -0x1a4(%rbp), %esi
movq -0x1a0(%rbp), %rdi
callq 0x2350
jmp 0x1960b
leaq -0x38(%rbp), %rdi
callq 0x2130
movq 0x119b5(%rip), %rdi     # 0x2afd0
leaq 0x5397(%rip), %rsi      # 0x1e9b9
callq 0x2200
movq %rax, %rdi
leaq 0x537c(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x1c0(%rbp)
movl $0x2, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x14700
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
callq 0x21d0
movq %rax, -0x1b0(%rbp)
jmp 0x1967d
movq -0x1b0(%rbp), %rdi
leaq 0x532a(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x1c8(%rbp)
jmp 0x19699
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x149f0
movl %eax, -0x1cc(%rbp)
jmp 0x196b6
movl -0x1cc(%rbp), %esi
movq -0x1c8(%rbp), %rdi
callq 0x2350
movq %rax, -0x1d8(%rbp)
jmp 0x196d1
movq -0x1d8(%rbp), %rdi
movq 0x118e1(%rip), %rsi     # 0x2afc0
callq 0x2240
jmp 0x196e6
leaq -0x68(%rbp), %rdi
callq 0x2130
movq 0x118da(%rip), %rdi     # 0x2afd0
leaq 0x52bf(%rip), %rsi      # 0x1e9bc
callq 0x2200
movq %rax, %rdi
leaq 0x52a1(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x1f0(%rbp)
movl $0x1, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x14700
movq -0x1f0(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
callq 0x21d0
movq %rax, -0x1e0(%rbp)
jmp 0x1975b
movq -0x1e0(%rbp), %rdi
leaq 0x524c(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x1f8(%rbp)
jmp 0x19777
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
callq 0x14730
movl %eax, -0x1fc(%rbp)
jmp 0x19794
movl -0x1fc(%rbp), %esi
movq -0x1f8(%rbp), %rdi
callq 0x2350
jmp 0x197a8
leaq -0x88(%rbp), %rdi
callq 0x2130
movq 0x11815(%rip), %rdi     # 0x2afd0
leaq 0x51f7(%rip), %rsi      # 0x1e9b9
callq 0x2200
movq %rax, %rdi
leaq 0x51dc(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x218(%rbp)
movl $0x2, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x14700
movq -0x218(%rbp), %rdi
movq -0x210(%rbp), %rsi
callq 0x21d0
movq %rax, -0x208(%rbp)
jmp 0x19820
movq -0x208(%rbp), %rdi
leaq 0x5187(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x220(%rbp)
jmp 0x1983c
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x14730
movl %eax, -0x224(%rbp)
jmp 0x19859
movl -0x224(%rbp), %esi
movq -0x220(%rbp), %rdi
callq 0x2350
movq %rax, -0x230(%rbp)
jmp 0x19874
movq -0x230(%rbp), %rdi
movq 0x1173e(%rip), %rsi     # 0x2afc0
callq 0x2240
jmp 0x19889
leaq -0xa8(%rbp), %rdi
callq 0x2130
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
callq 0x14730
movl %eax, %ecx
movq -0x178(%rbp), %rax
movl %ecx, -0x234(%rbp)
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x14730
movl %eax, %ecx
movl -0x234(%rbp), %eax
cmpl %ecx, %eax
jle 0x1997b
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x146a0
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0x146a0
jmp 0x199ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x146a0
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0x146a0
movq 0x1161d(%rip), %rdi     # 0x2afd0
leaq 0x5012(%rip), %rsi      # 0x1e9cc
callq 0x2200
movq %rax, %rdi
leaq 0x4fe4(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x250(%rbp)
movl $0x1, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x14700
movq -0x250(%rbp), %rdi
movq -0x248(%rbp), %rsi
callq 0x21d0
movq %rax, -0x240(%rbp)
jmp 0x19a18
movq -0x240(%rbp), %rdi
leaq 0x4f8f(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x258(%rbp)
jmp 0x19a34
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
callq 0x149f0
movl %eax, -0x25c(%rbp)
jmp 0x19a51
movl -0x25c(%rbp), %esi
movq -0x258(%rbp), %rdi
callq 0x2350
jmp 0x19a65
leaq -0xc8(%rbp), %rdi
callq 0x2130
movq 0x11558(%rip), %rdi     # 0x2afd0
leaq 0x4f3a(%rip), %rsi      # 0x1e9b9
callq 0x2200
movq %rax, %rdi
leaq 0x4f1f(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x278(%rbp)
movl $0x2, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x14700
movq -0x278(%rbp), %rdi
movq -0x270(%rbp), %rsi
callq 0x21d0
movq %rax, -0x268(%rbp)
jmp 0x19add
movq -0x268(%rbp), %rdi
leaq 0x4eca(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x280(%rbp)
jmp 0x19af9
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x149f0
movl %eax, -0x284(%rbp)
jmp 0x19b16
movl -0x284(%rbp), %esi
movq -0x280(%rbp), %rdi
callq 0x2350
movq %rax, -0x290(%rbp)
jmp 0x19b31
movq -0x290(%rbp), %rdi
movq 0x11481(%rip), %rsi     # 0x2afc0
callq 0x2240
jmp 0x19b46
leaq -0xe8(%rbp), %rdi
callq 0x2130
movq 0x11477(%rip), %rdi     # 0x2afd0
leaq 0x4e90(%rip), %rsi      # 0x1e9f0
callq 0x2200
movq %rax, %rdi
leaq 0x4e3e(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x2a8(%rbp)
movl $0x1, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x14700
movq -0x2a8(%rbp), %rdi
movq -0x2a0(%rbp), %rsi
callq 0x21d0
movq %rax, -0x298(%rbp)
jmp 0x19bbe
movq -0x298(%rbp), %rdi
leaq 0x4de9(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x2b0(%rbp)
jmp 0x19bda
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x160a0
movl %eax, -0x2b4(%rbp)
jmp 0x19bf2
movl -0x2b4(%rbp), %esi
movq -0x2b0(%rbp), %rdi
callq 0x2350
jmp 0x19c06
leaq -0x108(%rbp), %rdi
callq 0x2130
movq 0x113b7(%rip), %rdi     # 0x2afd0
leaq 0x4d99(%rip), %rsi      # 0x1e9b9
callq 0x2200
movq %rax, %rdi
leaq 0x4d7e(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x2d0(%rbp)
movl $0x2, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x128(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x14700
movq -0x2d0(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
callq 0x21d0
movq %rax, -0x2c0(%rbp)
jmp 0x19c7e
movq -0x2c0(%rbp), %rdi
leaq 0x4d29(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x2d8(%rbp)
jmp 0x19c9a
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x160a0
movl %eax, -0x2dc(%rbp)
jmp 0x19cb2
movl -0x2dc(%rbp), %esi
movq -0x2d8(%rbp), %rdi
callq 0x2350
movq %rax, -0x2e8(%rbp)
jmp 0x19ccd
movq -0x2e8(%rbp), %rdi
movq 0x112e5(%rip), %rsi     # 0x2afc0
callq 0x2240
jmp 0x19ce2
leaq -0x128(%rbp), %rdi
callq 0x2130
movq 0x112db(%rip), %rdi     # 0x2afd0
leaq 0x4d04(%rip), %rsi      # 0x1ea00
callq 0x2200
movq %rax, %rdi
leaq 0x4ca2(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x300(%rbp)
movl $0x1, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x148(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x14700
movq -0x300(%rbp), %rdi
movq -0x2f8(%rbp), %rsi
callq 0x21d0
movq %rax, -0x2f0(%rbp)
jmp 0x19d5a
movq -0x2f0(%rbp), %rdi
leaq 0x4c4d(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x308(%rbp)
jmp 0x19d76
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x16080
movl %eax, -0x30c(%rbp)
jmp 0x19d8e
movl -0x30c(%rbp), %esi
movq -0x308(%rbp), %rdi
callq 0x2350
jmp 0x19da2
leaq -0x148(%rbp), %rdi
callq 0x2130
movq 0x1121b(%rip), %rdi     # 0x2afd0
leaq 0x4bfd(%rip), %rsi      # 0x1e9b9
callq 0x2200
movq %rax, %rdi
leaq 0x4be2(%rip), %rsi      # 0x1e9ad
callq 0x2200
movq -0x178(%rbp), %rdi
movq %rax, -0x328(%rbp)
movl $0x2, %esi
callq 0x4d80
movq %rax, %rsi
leaq -0x168(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x14700
movq -0x328(%rbp), %rdi
movq -0x320(%rbp), %rsi
callq 0x21d0
movq %rax, -0x318(%rbp)
jmp 0x19e1a
movq -0x318(%rbp), %rdi
leaq 0x4b8d(%rip), %rsi      # 0x1e9b5
callq 0x2200
movq %rax, -0x330(%rbp)
jmp 0x19e36
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x16080
movl %eax, -0x334(%rbp)
jmp 0x19e4e
movl -0x334(%rbp), %esi
movq -0x330(%rbp), %rdi
callq 0x2350
movq %rax, -0x340(%rbp)
jmp 0x19e69
movq -0x340(%rbp), %rdi
movq 0x11149(%rip), %rsi     # 0x2afc0
callq 0x2240
jmp 0x19e7e
leaq -0x168(%rbp), %rdi
callq 0x2130
movq -0x178(%rbp), %rdi
callq 0x1a490
cmpl $0x1, %eax
jne 0x19f69
movq -0x178(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x146a0
jmp 0x19f83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x2130
jmp 0x19fd3
movq -0x178(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x146a0
movq -0x178(%rbp), %rdi
callq 0x1a490
movq -0x178(%rbp), %rdi
movl %eax, %esi
callq 0x19450
movq -0x178(%rbp), %rdi
callq 0x4d60
movq -0x178(%rbp), %rdi
movl %eax, -0x16c(%rbp)
movl -0x16c(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x16c(%rbp)
callq 0x19250
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2360
nopl (%rax)