public override void ApplyTo(SimpleGameServer server) { Snakes = server.GetObjectsByName("Snake").Where(@object => @object.ObjectName == "SnakeHead").ToList(); Apples = server.GetObjectsByName("Apple").ToList(); Snakes.ForEach(snake => { SnakeProperties properties = (SnakeProperties)snake.ObjectProperties; Apples.ForEach(apple => { if (apple.Position == properties.Head.Position) { LoggingService.LogMessage($"Player picked up an Apple.{snake.Owner.ClientHashCode}"); server.RemoveObject(apple); properties.Length += 1; properties.Score += 1; if (server.TickInterval - 20 > 0) { server.SetTickInterval(server.TickInterval - 20); } } }); }); }