game implementation