Implementing all game ending conditions.
Merge pull request #8 from yuizumi/finish

Implementing all game ending conditions.