formatting
This commit is contained in:
parent
d4d0abd013
commit
1f0e6ba8fa
19 changed files with 88 additions and 79 deletions
|
@ -3,4 +3,4 @@ using System.Text.Json.Serialization;
|
|||
namespace TanksServer.Interactivity;
|
||||
|
||||
[JsonSerializable(typeof(Player))]
|
||||
internal sealed partial class AppSerializerContext: JsonSerializerContext;
|
||||
internal sealed partial class AppSerializerContext : JsonSerializerContext;
|
||||
|
|
|
@ -29,7 +29,7 @@ internal sealed class PlayerServer(ILogger<PlayerServer> logger, SpawnQueue spaw
|
|||
}
|
||||
|
||||
public IEnumerable<Player> GetAll() => _players.Values;
|
||||
|
||||
|
||||
private Player AddAndSpawn(string name)
|
||||
{
|
||||
var player = new Player(name);
|
||||
|
|
|
@ -8,19 +8,19 @@ namespace TanksServer.Interactivity;
|
|||
|
||||
internal sealed class SendToServicePointDisplay : ITickStep
|
||||
{
|
||||
private readonly LastFinishedFrameProvider _lastFinishedFrameProvider;
|
||||
private readonly Cp437Grid _scoresBuffer;
|
||||
private readonly PlayerServer _players;
|
||||
private readonly ILogger<SendToServicePointDisplay> _logger;
|
||||
private readonly IDisplayConnection _displayConnection;
|
||||
private PixelGrid? _lastSentFrame;
|
||||
|
||||
private DateTime _nextFailLog = DateTime.Now;
|
||||
|
||||
private const int ScoresWidth = 12;
|
||||
private const int ScoresHeight = 20;
|
||||
private const int ScoresPlayerRows = ScoresHeight - 5;
|
||||
|
||||
private readonly IDisplayConnection _displayConnection;
|
||||
private readonly LastFinishedFrameProvider _lastFinishedFrameProvider;
|
||||
private readonly ILogger<SendToServicePointDisplay> _logger;
|
||||
private readonly PlayerServer _players;
|
||||
private readonly Cp437Grid _scoresBuffer;
|
||||
|
||||
private PixelGrid? _lastSentFrame;
|
||||
private DateTime _nextFailLog = DateTime.Now;
|
||||
|
||||
public SendToServicePointDisplay(
|
||||
LastFinishedFrameProvider lastFinishedFrameProvider,
|
||||
PlayerServer players,
|
||||
|
@ -90,4 +90,4 @@ internal sealed class SendToServicePointDisplay : ITickStep
|
|||
for (; row < 17; row++)
|
||||
_scoresBuffer[row] = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue