servicepoint-tanks/TanksServer/Graphics/BulletDrawer.cs
2024-04-12 16:10:38 +02:00

16 lines
377 B
C#

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