fix u16 issue.

fyi.
complete main game logic.

fyi.