further decoupling of ui class and game class