more commands, change display communication to new lib

This commit is contained in:
Vinzenz Schroeter 2024-04-12 16:05:24 +02:00
commit 7213318838

View file

@ -1,13 +1,16 @@
using DisplayCommands;
using TanksServer.GameLogic;
using TanksServer.ServicePointDisplay;
namespace TanksServer.Graphics;
internal sealed class BulletDrawer(BulletManager bullets): IDrawStep
internal sealed class BulletDrawer(BulletManager bullets) : IDrawStep
{
public void Draw(PixelDisplayBufferView buffer)
public void Draw(PixelGrid buffer)
{
foreach (var bullet in bullets.GetAll())
buffer.Pixels[bullet.Position.ToPixelPosition()] = true;
{
var pos = bullet.Position.ToPixelPosition();
buffer[pos.X, pos.Y] = true;
}
}
}
}