clean code GameLayer