Added game state system.
Added gameover handling. Closes #26. Closes #27.