// File: MatthewZMD[P]TetrisDual/game.cc
// Function: Game::execAction(std::istream&)
void Game::execAction(std::istream & in) {
    std::cout << "Please unleash your special powers: ";
    std::string cmd;
    in >> cmd;
    if (cmd == "blind") {
        blind();
    }
    else if (cmd == "heavy") {
        heavy();
    }
    else if (cmd == "force") {
        std::string t;
        in >> t;

        CellType type = CellType::E;

        if (t == "I") {
            type = CellType::I;
        }
        else if (t == "J") {
            type = CellType::J;
        }
        else if (t == "L") {
            type = CellType::L;
        }
        else if (t == "O") {
            type = CellType::O;
        }
        else if (t == "S") {
            type = CellType::S;
        }
        else if (t == "Z") {
            type = CellType::Z;
        }
        else if (t == "T") {
            type = CellType::T;
        }

        force(type);
    } else {
        std::cout << "What are you talking about?" << std::endl;
        execAction(in);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq 0x29166(%rip), %rdi     # 0x43fa8
leaq 0x12671(%rip), %rsi     # 0x2d4ba
callq 0x6350
leaq -0x30(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x6500
movq -0x70(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x6490
jmp 0x1ae6a
leaq 0x1266e(%rip), %rsi     # 0x2d4df
leaq -0x30(%rbp), %rdi
callq 0x7230
movb %al, -0x79(%rbp)
jmp 0x1ae7f
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x1ae88
jmp 0x1aea9
movq -0x78(%rbp), %rdi
callq 0x1ab10
jmp 0x1ae93
jmp 0x1b0eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1b0fd
leaq 0x12635(%rip), %rsi     # 0x2d4e5
leaq -0x30(%rbp), %rdi
callq 0x7230
movb %al, -0x7a(%rbp)
jmp 0x1aebe
movb -0x7a(%rbp), %al
testb $0x1, %al
jne 0x1aec7
jmp 0x1aed7
movq -0x78(%rbp), %rdi
callq 0x1aa90
jmp 0x1aed2
jmp 0x1b0e9
leaq 0x1260d(%rip), %rsi     # 0x2d4eb
leaq -0x30(%rbp), %rdi
callq 0x7230
movb %al, -0x7b(%rbp)
jmp 0x1aeec
movb -0x7b(%rbp), %al
testb $0x1, %al
jne 0x1aef8
jmp 0x1b0a5
leaq -0x60(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x6500
movq -0x88(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x6490
jmp 0x1af1a
movl $0x7, -0x64(%rbp)
leaq 0x129fc(%rip), %rsi     # 0x2d924
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x89(%rbp)
jmp 0x1af39
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x1af45
jmp 0x1af6b
movl $0x0, -0x64(%rbp)
jmp 0x1b08c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x6230
jmp 0x1b0fd
leaq 0x129b6(%rip), %rsi     # 0x2d928
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x8a(%rbp)
jmp 0x1af83
movb -0x8a(%rbp), %al
testb $0x1, %al
jne 0x1af8f
jmp 0x1af9b
movl $0x1, -0x64(%rbp)
jmp 0x1b08a
leaq 0x12972(%rip), %rsi     # 0x2d914
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x8b(%rbp)
jmp 0x1afb3
movb -0x8b(%rbp), %al
testb $0x1, %al
jne 0x1afbf
jmp 0x1afcb
movl $0x2, -0x64(%rbp)
jmp 0x1b088
leaq 0x12945(%rip), %rsi     # 0x2d917
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x8c(%rbp)
jmp 0x1afe3
movb -0x8c(%rbp), %al
testb $0x1, %al
jne 0x1afef
jmp 0x1affb
movl $0x3, -0x64(%rbp)
jmp 0x1b086
leaq 0x12919(%rip), %rsi     # 0x2d91b
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x8d(%rbp)
jmp 0x1b013
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0x1b01f
jmp 0x1b028
movl $0x4, -0x64(%rbp)
jmp 0x1b084
leaq 0x12901(%rip), %rsi     # 0x2d930
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x8e(%rbp)
jmp 0x1b040
movb -0x8e(%rbp), %al
testb $0x1, %al
jne 0x1b04c
jmp 0x1b055
movl $0x5, -0x64(%rbp)
jmp 0x1b082
leaq 0x128d7(%rip), %rsi     # 0x2d933
leaq -0x60(%rbp), %rdi
callq 0x7230
movb %al, -0x8f(%rbp)
jmp 0x1b06d
movb -0x8f(%rbp), %al
testb $0x1, %al
jne 0x1b079
jmp 0x1b080
movl $0x6, -0x64(%rbp)
jmp 0x1b082
jmp 0x1b084
jmp 0x1b086
jmp 0x1b088
jmp 0x1b08a
jmp 0x1b08c
movq -0x78(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x1abc0
jmp 0x1b09a
leaq -0x60(%rbp), %rdi
callq 0x6230
jmp 0x1b0e7
movq 0x28efc(%rip), %rdi     # 0x43fa8
leaq 0x12172(%rip), %rsi     # 0x2d225
callq 0x6350
movq %rax, -0x98(%rbp)
jmp 0x1b0c1
movq -0x98(%rbp), %rdi
movq 0x28eb1(%rip), %rsi     # 0x43f80
callq 0x63a0
jmp 0x1b0d6
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1ae20
jmp 0x1b0e5
jmp 0x1b0e7
jmp 0x1b0e9
jmp 0x1b0eb
leaq -0x30(%rbp), %rdi
callq 0x6230
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x6230
movq -0x38(%rbp), %rdi
callq 0x6630
nop