Add game logic.

Signed-off-by: cyberzhg <cyberzhg@gmail.com>