refactoring code

Signed-off-by: vincent_home <shix_112@126.com>
Merge branch 'master' of github.com:vincentshi/snakeGameWithLua

Conflicts:
	README.md

Signed-off-by: vincent_home <shix_112@126.com>