This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
servicepoint-tanks/TanksServer/Interactivity/SendToClientScreen.cs
2024-04-10 19:25:45 +02:00

18 lines
476 B
C#

using TanksServer.GameLogic;
using TanksServer.Graphics;
namespace TanksServer.Interactivity;
internal sealed class SendToClientScreen(
ClientScreenServer clientScreenServer,
LastFinishedFrameProvider lastFinishedFrameProvider
) : ITickStep
{
public Task TickAsync()
{
var tasks = clientScreenServer
.GetConnections()
.Select(c => c.SendAsync(lastFinishedFrameProvider.LastFrame));
return Task.WhenAll(tasks);
}
}