public static ProcessingResult Started(ServerMsgStart msgStart) { return(new ProcessingResult(ResultType.Started) { _msgStart = msgStart }); }
public void ShouldSerializeAndDeserializeStart(int seed, string[] players, byte yourIndex, byte tps) { var originalMsg = new ServerMsgStart(seed, players, yourIndex, tps); var buf = CreateBuffer(originalMsg); var written = originalMsg.WriteTo(buf, 0); Assert.True(written == buf.Length); var restoredMsg = new ServerMsgStart(buf, 0); Assert.True(originalMsg.Seed == restoredMsg.Seed); Assert.True(originalMsg.YourIndex == restoredMsg.YourIndex); Assert.True(originalMsg.TicksPerSecond == restoredMsg.TicksPerSecond); Assert.True(originalMsg.Players.Length == restoredMsg.Players.Length); for (var i = 0; i < originalMsg.Players.Length; i++) { Assert.True(originalMsg.Players[i] == restoredMsg.Players[i]); } }
public NetworkGameScreen(DPong game, ClientSession session, ServerMsgStart startMsg, in InputSourceDescriptor inputSrc)