implemented detection collision and gameState message