Fix style

This project uses following coding-style.

* function

    type
    functionName()
    {
      // something
    }

* if statement

    if () {
      // something
    }

* while statement

    while () {
      // something
    }
Extract code of computer operation
Extract code of player operation