prepare to send different data per client

This commit is contained in:
Vinzenz Schroeter 2024-04-15 20:34:23 +02:00
commit fbaad86555

View file

@ -1,11 +1,10 @@
using DisplayCommands;
using TanksServer.GameLogic;
namespace TanksServer.Graphics;
internal sealed class DrawMapStep(MapService map) : IDrawStep
{
public void Draw(PixelGrid buffer)
public void Draw(GamePixelGrid pixels)
{
for (ushort y = 0; y < MapService.PixelsPerColumn; y++)
for (ushort x = 0; x < MapService.PixelsPerRow; x++)
@ -13,7 +12,8 @@ internal sealed class DrawMapStep(MapService map) : IDrawStep
var pixel = new PixelPosition(x, y);
if (!map.Current.IsWall(pixel))
continue;
buffer[x, y] = true;
pixels[x, y].EntityType = GamePixelEntityType.Wall;
}
}
}