1. fix bug: fix the generation function's bug
2. feature: implement the game logic