update game logic and clean up code
Merge pull request #5 from JoeDou/joeDev

update game logic and clean up code