2024-04-13 14:07:14 +02:00
|
|
|
using DisplayCommands;
|
|
|
|
using TanksServer.GameLogic;
|
|
|
|
|
|
|
|
namespace TanksServer.Graphics;
|
|
|
|
|
|
|
|
internal sealed class DrawBulletsStep(BulletManager bullets) : IDrawStep
|
|
|
|
{
|
|
|
|
public void Draw(PixelGrid buffer)
|
|
|
|
{
|
|
|
|
foreach (var position in bullets.GetAll().Select(b => b.Position.ToPixelPosition()))
|
2024-04-13 16:27:45 +02:00
|
|
|
buffer[(ushort)position.X, (ushort)position.Y] = true;
|
2024-04-13 14:07:14 +02:00
|
|
|
}
|
|
|
|
}
|