Added functions in functions.py.
Improved game.py.