a logic system for game