using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using SystemRevivalServer.Networking.Messages; namespace Server.Services.World; public interface IWorldService { /// Spawn the selected character into the world (owner-only). /// Returns the player's own spawn data and a list of already-present neighbors to display. Task<(bool ok, string? error, WorldSpawn self, IEnumerable neighbors)> SpawnAsync(ulong accountId, ulong characterId, CancellationToken ct); /// Queue a client input for the zone owner to process. void EnqueueInput(ulong zoneId, ulong characterId, float dx, float dy, float facingRad, uint clientSeq); /// Owner tick: integrate movement, update presence/grid. Task TickOwnerAsync(ulong zoneId, float dt, CancellationToken ct); /// Build a snapshot (naive: full-zone). Call at 10Hz and broadcast. WorldState BuildSnapshot(ulong zoneId, long tick); }