// File: /workspace/github_cpp_makefile_star2_O2/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::executeMenuOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void DNWindow::executeMenuOption(string input)
{

    if (isalnum(*input.c_str())) {
        switch (atoi(input.c_str())) {
        case 1:
        {
            DNGame a(1);
            drawBoard(3, 0, 100);
            a.play();
            break;
        }
        case 2:
        {
            DNGame a(2);
            drawBoard(3, 0, 100);
            a.play();
            break;
        }
            
        case 3:
        {
            DNGame game(3);
            
            DNLogService::sharedObject().log(string("Starting to draw board \n"));
            drawBoard(3,0,100);
            DNLogService::sharedObject().log(string("going to play"));
            game.playNetworkgame();
            break;
        }
        case 4:{
            DNGame a(27);
            drawBoard(3,0,100);
            a.play();
            break;
        }
            
        default:
            break;
        }
    }

    if (input == "I" || input == "i") {
        clearScreen();
        refresh();
        
    }

    if (input == "Q" || input == "q") {
        terminate();
    }else{
        terminateWithErrorMessage(string("Wrong Input"));
    }

    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x13920, %rsp          # imm = 0x13920
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movsbl (%r15), %edi
callq 0x3300
testl %eax, %eax
jne 0x6d81
leaq 0x17f1(%rip), %rsi      # 0x851e
movq %rbx, %rdi
callq 0x5e13
testb %al, %al
jne 0x6d4c
leaq 0x17e0(%rip), %rsi      # 0x8520
movq %rbx, %rdi
callq 0x5e13
testb %al, %al
je 0x6d56
callq 0x7046
callq 0x34a0
leaq 0x17c5(%rip), %rsi      # 0x8522
movq %rbx, %rdi
callq 0x5e13
testb %al, %al
jne 0x6d7c
leaq 0x17b4(%rip), %rsi      # 0x8524
movq %rbx, %rdi
callq 0x5e13
testb %al, %al
je 0x6dcc
callq 0x7052
movq %r15, %rdi
callq 0x3450
decl %eax
cmpl $0x3, %eax
ja 0x6d26
leaq 0x16ad(%rip), %rcx      # 0x8444
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x68(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x3d28
pushq $0x3
popq %rsi
pushq $0x64
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6f2a
leaq 0x68(%rsp), %rdi
callq 0x41c2
jmp 0x6ecf
leaq 0x1753(%rip), %rsi      # 0x8526
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x3c1e
leaq 0x48(%rsp), %rsi
callq 0x7060
leaq 0x68(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x3d28
callq 0x3c5a
movq %rax, %r15
leaq 0x16ef(%rip), %rsi      # 0x84f7
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3c1e
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x44b0
leaq 0x28(%rsp), %rdi
callq 0x3170
pushq $0x3
popq %rsi
pushq $0x64
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6f2a
callq 0x3c5a
movq %rax, %r14
leaq 0x16c3(%rip), %rsi      # 0x8510
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3c1e
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x44b0
leaq 0x8(%rsp), %rdi
callq 0x3170
leaq 0x68(%rsp), %rdi
callq 0x41ec
jmp 0x6ecf
leaq 0x68(%rsp), %rdi
pushq $0x1b
popq %rsi
callq 0x3d28
pushq $0x3
popq %rsi
pushq $0x64
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6f2a
leaq 0x68(%rsp), %rdi
callq 0x41c2
jmp 0x6ecf
leaq 0x68(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x3d28
pushq $0x3
popq %rsi
pushq $0x64
popq %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x6f2a
leaq 0x68(%rsp), %rdi
callq 0x41c2
leaq 0x68(%rsp), %rdi
callq 0x416e
jmp 0x6d26
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x6ef2
jmp 0x6f01
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3170
jmp 0x6f04
jmp 0x6f01
jmp 0x6f01
jmp 0x6f01
jmp 0x6f01
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x416e
jmp 0x6f22
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3170
jmp 0x6f22
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34d0