Moved logics into game