internal void ReturnPolicyCard(byte picked, bool isPresident) { var byteObj = new NetworkByteObject(isPresident ? ServerCommands.PresidentPolicyCardPicked : ServerCommands.ChancellorPolicyCardPicked, picked); new SendMsgHandler(byteObj, this); }
public void ByteObjectDecoder() { var decoder = new NetworkByteObject.ByteObjectDecoder(); for(byte i = 0; i < 10; i++) { var obj = new NetworkByteObject(ServerCommands.PolicyCardsDrawn, i); var bytes = decoder.GenerateByteStream(obj); var generated = decoder.GenerateObject(bytes, false) as NetworkByteObject; Assert.AreEqual(obj.Value, generated.Value); CompareDefaultObject(obj, generated); } }