use canvas and dom object to realize the game