// File: smallHW89[P]gobang/test_main.cpp
// Function: main
int main()
{
    int x, y ;
    char side;
    ChessBoard board;
    printf("please select the AI's side(w/b)\n");
    scanf("%c", &side);
    printf("AI's side is %c \n", side);

    board.SetAISide(side);
    StPos humPos(0,0,'w');
    StPos aiPos(0,0,'b');

    if( side == 'w')
    {
        while(1)
        {
            printf("human please  input your black chess:\n");
            scanf("%u %u",  &x, &y);
            printf("Human Put white  Chess %u %u\n",x , y);
            humPos.x = x; humPos.y = y;
            board.PutHumenChessGetAI( humPos , aiPos);
            board.ShowChessBoard();
            printf("AI put black chess: %u %u\n", aiPos.x, aiPos.y );
            board.PutChess(aiPos.x, aiPos.y, Chess_White);
            board.ShowChessBoard();
        }
    }

    if(side == 'b')
    {
        while(1)
        {
            board.PutHumenChessGetAI(humPos, aiPos);
            board.ShowChessBoard();
            printf("Ai Put black chess  %u %u \n",  aiPos.x, aiPos.y);        
            board.PutChess(aiPos.x, aiPos.y, Chess_Black);
            board.ShowChessBoard();
            printf("human please input your white chess\n"); 
            scanf("%u %u",  &x, &y);
            printf("Human Put white  Chess %u %u\n",x , y);
            humPos.x = x; humPos.y = y; 
        }
    }

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movl $0x0, -0x4(%rbp)
leaq -0x268(%rbp), %rdi
movl $0xf, %esi
callq 0x1200
leaq 0xfa4(%rip), %rdi       # 0x807e
xorl %eax, %eax
callq 0x1030
jmp 0x70e3
leaq 0xfb6(%rip), %rdi       # 0x80a0
xorl %eax, %eax
leaq -0xd(%rbp), %rsi
callq 0x10d0
jmp 0x70f7
movsbl -0xd(%rbp), %esi
leaq 0xfa1(%rip), %rdi       # 0x80a3
xorl %eax, %eax
callq 0x1030
jmp 0x710b
movsbl -0xd(%rbp), %esi
leaq -0x268(%rbp), %rdi
callq 0x7360
jmp 0x711d
leaq -0x290(%rbp), %rdi
xorl %edx, %edx
movl $0x77, %ecx
movl %edx, %esi
callq 0x4de0
jmp 0x7134
leaq -0x2a8(%rbp), %rdi
xorl %edx, %edx
movl $0x62, %ecx
movl %edx, %esi
callq 0x4de0
jmp 0x714b
movsbl -0xd(%rbp), %eax
cmpl $0x77, %eax
jne 0x724c
jmp 0x715a
jmp 0x715c
leaq 0xf52(%rip), %rdi       # 0x80b5
xorl %eax, %eax
callq 0x1030
jmp 0x716c
leaq 0xf69(%rip), %rdi       # 0x80dc
xorl %eax, %eax
leaq -0x8(%rbp), %rsi
leaq -0xc(%rbp), %rdx
callq 0x10d0
jmp 0x7184
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0xf51(%rip), %rdi       # 0x80e2
xorl %eax, %eax
callq 0x1030
jmp 0x719a
movl -0x8(%rbp), %eax
movl %eax, -0x290(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28c(%rbp)
leaq -0x268(%rbp), %rdi
leaq -0x290(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x4b90
jmp 0x71c8
leaq -0x268(%rbp), %rdi
callq 0x13d0
jmp 0x71d6
movl -0x2a8(%rbp), %esi
movl -0x2a4(%rbp), %edx
leaq 0xf17(%rip), %rdi       # 0x8100
xorl %eax, %eax
callq 0x1030
jmp 0x71f2
movl -0x2a8(%rbp), %esi
movl -0x2a4(%rbp), %edx
leaq 0xe01(%rip), %rax       # 0x8006
movsbl (%rax), %ecx
leaq -0x268(%rbp), %rdi
callq 0x12e0
jmp 0x7216
leaq -0x268(%rbp), %rdi
callq 0x13d0
jmp 0x7224
jmp 0x715a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x270(%rbp)
movl %eax, -0x274(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x73c0
jmp 0x7349
movsbl -0xd(%rbp), %eax
cmpl $0x62, %eax
jne 0x732a
jmp 0x725b
jmp 0x725d
leaq -0x268(%rbp), %rdi
leaq -0x290(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x4b90
jmp 0x7279
leaq -0x268(%rbp), %rdi
callq 0x13d0
jmp 0x7287
movl -0x2a8(%rbp), %esi
movl -0x2a4(%rbp), %edx
leaq 0xe81(%rip), %rdi       # 0x811b
xorl %eax, %eax
callq 0x1030
jmp 0x72a3
movl -0x2a8(%rbp), %esi
movl -0x2a4(%rbp), %edx
leaq 0xd4f(%rip), %rax       # 0x8005
movsbl (%rax), %ecx
leaq -0x268(%rbp), %rdi
callq 0x12e0
jmp 0x72c7
leaq -0x268(%rbp), %rdi
callq 0x13d0
jmp 0x72d5
leaq 0xe5b(%rip), %rdi       # 0x8137
xorl %eax, %eax
callq 0x1030
jmp 0x72e5
leaq 0xdf0(%rip), %rdi       # 0x80dc
xorl %eax, %eax
leaq -0x8(%rbp), %rsi
leaq -0xc(%rbp), %rdx
callq 0x10d0
jmp 0x72fd
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0xdd8(%rip), %rdi       # 0x80e2
xorl %eax, %eax
callq 0x1030
jmp 0x7313
movl -0x8(%rbp), %eax
movl %eax, -0x290(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28c(%rbp)
jmp 0x725b
movl $0x0, -0x4(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x73c0
movl -0x4(%rbp), %eax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq -0x270(%rbp), %rdi
callq 0x10f0
nopw %cs:(%rax,%rax)
nop