refactor gui (fronted)

add config variables check function
refactor game (backend)