Added game engine loop and remove the cache of the drawing of figures
Added figure flag