fixed some bugs,beginning work to game.