diff --git a/unity/Assets/Scripts/grpc/Game.cs b/unity/Assets/Scripts/grpc/Game.cs index 48d75d8..b1a4f2a 100644 --- a/unity/Assets/Scripts/grpc/Game.cs +++ b/unity/Assets/Scripts/grpc/Game.cs @@ -25,36 +25,52 @@ namespace Game { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CgpnYW1lLnByb3RvEgRnYW1lGhtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJv", - "dG8idAoJQ2FyZEluZGV4Eg8KBWluZGV4GAEgASgNSAASJQoDdG9wGAIgASgL", - "MhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5SAASKAoGYm90dG9tGAMgASgLMhYu", - "Z29vZ2xlLnByb3RvYnVmLkVtcHR5SABCBQoDcG9zIk0KCFBpbGVLaW5kEg8K", - "BW93bmVkGAEgASgNSAASKAoGY29tbW9uGAIgASgLMhYuZ29vZ2xlLnByb3Rv", - "YnVmLkVtcHR5SABCBgoEa2luZCJgCgZDYXJkSWQSIAoIcGlsZUtpbmQYASAB", - "KAsyDi5nYW1lLlBpbGVLaW5kEhAKCHBpbGVOYW1lGAIgASgJEiIKCWNhcmRJ", - "bmRleBgDIAEoCzIPLmdhbWUuQ2FyZEluZGV4MjcKBEdhbWUSLwoHb25DbGlj", - "axIMLmdhbWUuQ2FyZElkGhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5YgZwcm90", - "bzM=")); + "dG8iGAoIQ2FyZEtpbmQSDAoEa2luZBgBIAEoCSIjCgVJbWFnZRIMCgRmYWNl", + "GAEgASgMEgwKBGJhY2sYAiABKAwidAoJQ2FyZEluZGV4Eg8KBWluZGV4GAEg", + "ASgNSAASJQoDdG9wGAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5SAAS", + "KAoGYm90dG9tGAMgASgLMhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5SABCBQoD", + "cG9zIk0KCFBpbGVLaW5kEg8KBW93bmVkGAEgASgNSAASKAoGY29tbW9uGAIg", + "ASgLMhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5SABCBgoEa2luZCJgCgZDYXJk", + "SWQSIAoIcGlsZUtpbmQYASABKAsyDi5nYW1lLlBpbGVLaW5kEhAKCHBpbGVO", + "YW1lGAIgASgJEiIKCWNhcmRJbmRleBgDIAEoCzIPLmdhbWUuQ2FyZEluZGV4", + "IvMCCg1NZXNzYWdlU3RhdHVzEi4KC2NvbW1vblBpbGVzGAEgASgLMhkuZ2Ft", + "ZS5NZXNzYWdlU3RhdHVzLlBpbGVzEi4KC3BsYXllclBpbGVzGAIgAygLMhku", + "Z2FtZS5NZXNzYWdlU3RhdHVzLlBpbGVzEhMKC2N1cnJlbnRUdXJuGAMgASgN", + "GjUKBENhcmQSHAoEa2luZBgBIAEoCzIOLmdhbWUuQ2FyZEtpbmQSDwoHdmlz", + "aWJsZRgCIAEoCBovCgRQaWxlEicKBWNhcmRzGAEgAygLMhguZ2FtZS5NZXNz", + "YWdlU3RhdHVzLkNhcmQahAEKBVBpbGVzEjMKBXBpbGVzGAEgAygLMiQuZ2Ft", + "ZS5NZXNzYWdlU3RhdHVzLlBpbGVzLlBpbGVzRW50cnkaRgoKUGlsZXNFbnRy", + "eRILCgNrZXkYASABKAkSJwoFdmFsdWUYAiABKAsyGC5nYW1lLk1lc3NhZ2VT", + "dGF0dXMuUGlsZToCOAEymwEKBEdhbWUSKwoMZ2V0Q2FyZEltYWdlEg4uZ2Ft", + "ZS5DYXJkS2luZBoLLmdhbWUuSW1hZ2USLwoHb25DbGljaxIMLmdhbWUuQ2Fy", + "ZElkGhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5EjUKBnN0YXR1cxIWLmdvb2ds", + "ZS5wcm90b2J1Zi5FbXB0eRoTLmdhbWUuTWVzc2FnZVN0YXR1c2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Game.CardKind), global::Game.CardKind.Parser, new[]{ "Kind" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Game.Image), global::Game.Image.Parser, new[]{ "Face", "Back" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Game.CardIndex), global::Game.CardIndex.Parser, new[]{ "Index", "Top", "Bottom" }, new[]{ "Pos" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Game.PileKind), global::Game.PileKind.Parser, new[]{ "Owned", "Common" }, new[]{ "Kind" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Game.CardId), global::Game.CardId.Parser, new[]{ "PileKind", "PileName", "CardIndex" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Game.CardId), global::Game.CardId.Parser, new[]{ "PileKind", "PileName", "CardIndex" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Game.MessageStatus), global::Game.MessageStatus.Parser, new[]{ "CommonPiles", "PlayerPiles", "CurrentTurn" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Game.MessageStatus.Types.Card), global::Game.MessageStatus.Types.Card.Parser, new[]{ "Kind", "Visible" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Game.MessageStatus.Types.Pile), global::Game.MessageStatus.Types.Pile.Parser, new[]{ "Cards" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Game.MessageStatus.Types.Piles), global::Game.MessageStatus.Types.Piles.Parser, new[]{ "Piles_" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })}) })); } #endregion } #region Messages - public sealed partial class CardIndex : pb::IMessage + public sealed partial class CardKind : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardIndex()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardKind()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -67,114 +83,55 @@ namespace Game { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardIndex() { + public CardKind() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardIndex(CardIndex other) : this() { - switch (other.PosCase) { - case PosOneofCase.Index: - Index = other.Index; - break; - case PosOneofCase.Top: - Top = other.Top.Clone(); - break; - case PosOneofCase.Bottom: - Bottom = other.Bottom.Clone(); - break; - } - + public CardKind(CardKind other) : this() { + kind_ = other.kind_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardIndex Clone() { - return new CardIndex(this); - } - - /// Field number for the "index" field. - public const int IndexFieldNumber = 1; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint Index { - get { return posCase_ == PosOneofCase.Index ? (uint) pos_ : 0; } - set { - pos_ = value; - posCase_ = PosOneofCase.Index; - } - } - - /// Field number for the "top" field. - public const int TopFieldNumber = 2; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Google.Protobuf.WellKnownTypes.Empty Top { - get { return posCase_ == PosOneofCase.Top ? (global::Google.Protobuf.WellKnownTypes.Empty) pos_ : null; } - set { - pos_ = value; - posCase_ = value == null ? PosOneofCase.None : PosOneofCase.Top; - } + public CardKind Clone() { + return new CardKind(this); } - /// Field number for the "bottom" field. - public const int BottomFieldNumber = 3; + /// Field number for the "kind" field. + public const int KindFieldNumber = 1; + private string kind_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Google.Protobuf.WellKnownTypes.Empty Bottom { - get { return posCase_ == PosOneofCase.Bottom ? (global::Google.Protobuf.WellKnownTypes.Empty) pos_ : null; } + public string Kind { + get { return kind_; } set { - pos_ = value; - posCase_ = value == null ? PosOneofCase.None : PosOneofCase.Bottom; + kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - private object pos_; - /// Enum of possible cases for the "pos" oneof. - public enum PosOneofCase { - None = 0, - Index = 1, - Top = 2, - Bottom = 3, - } - private PosOneofCase posCase_ = PosOneofCase.None; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PosOneofCase PosCase { - get { return posCase_; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void ClearPos() { - posCase_ = PosOneofCase.None; - pos_ = null; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as CardIndex); + return Equals(other as CardKind); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(CardIndex other) { + public bool Equals(CardKind other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Index != other.Index) return false; - if (!object.Equals(Top, other.Top)) return false; - if (!object.Equals(Bottom, other.Bottom)) return false; - if (PosCase != other.PosCase) return false; + if (Kind != other.Kind) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (posCase_ == PosOneofCase.Index) hash ^= Index.GetHashCode(); - if (posCase_ == PosOneofCase.Top) hash ^= Top.GetHashCode(); - if (posCase_ == PosOneofCase.Bottom) hash ^= Bottom.GetHashCode(); - hash ^= (int) posCase_; + if (Kind.Length != 0) hash ^= Kind.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -191,17 +148,9 @@ namespace Game { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (posCase_ == PosOneofCase.Index) { - output.WriteRawTag(8); - output.WriteUInt32(Index); - } - if (posCase_ == PosOneofCase.Top) { - output.WriteRawTag(18); - output.WriteMessage(Top); - } - if (posCase_ == PosOneofCase.Bottom) { - output.WriteRawTag(26); - output.WriteMessage(Bottom); + if (Kind.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Kind); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -212,17 +161,9 @@ namespace Game { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (posCase_ == PosOneofCase.Index) { - output.WriteRawTag(8); - output.WriteUInt32(Index); - } - if (posCase_ == PosOneofCase.Top) { - output.WriteRawTag(18); - output.WriteMessage(Top); - } - if (posCase_ == PosOneofCase.Bottom) { - output.WriteRawTag(26); - output.WriteMessage(Bottom); + if (Kind.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Kind); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -233,14 +174,8 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (posCase_ == PosOneofCase.Index) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Index); - } - if (posCase_ == PosOneofCase.Top) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Top); - } - if (posCase_ == PosOneofCase.Bottom) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bottom); + if (Kind.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Kind); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -249,28 +184,13 @@ namespace Game { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(CardIndex other) { + public void MergeFrom(CardKind other) { if (other == null) { return; } - switch (other.PosCase) { - case PosOneofCase.Index: - Index = other.Index; - break; - case PosOneofCase.Top: - if (Top == null) { - Top = new global::Google.Protobuf.WellKnownTypes.Empty(); - } - Top.MergeFrom(other.Top); - break; - case PosOneofCase.Bottom: - if (Bottom == null) { - Bottom = new global::Google.Protobuf.WellKnownTypes.Empty(); - } - Bottom.MergeFrom(other.Bottom); - break; + if (other.Kind.Length != 0) { + Kind = other.Kind; } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -285,26 +205,8 @@ namespace Game { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Index = input.ReadUInt32(); - break; - } - case 18: { - global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); - if (posCase_ == PosOneofCase.Top) { - subBuilder.MergeFrom(Top); - } - input.ReadMessage(subBuilder); - Top = subBuilder; - break; - } - case 26: { - global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); - if (posCase_ == PosOneofCase.Bottom) { - subBuilder.MergeFrom(Bottom); - } - input.ReadMessage(subBuilder); - Bottom = subBuilder; + case 10: { + Kind = input.ReadString(); break; } } @@ -321,26 +223,8 @@ namespace Game { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - Index = input.ReadUInt32(); - break; - } - case 18: { - global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); - if (posCase_ == PosOneofCase.Top) { - subBuilder.MergeFrom(Top); - } - input.ReadMessage(subBuilder); - Top = subBuilder; - break; - } - case 26: { - global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); - if (posCase_ == PosOneofCase.Bottom) { - subBuilder.MergeFrom(Bottom); - } - input.ReadMessage(subBuilder); - Bottom = subBuilder; + case 10: { + Kind = input.ReadString(); break; } } @@ -350,15 +234,15 @@ namespace Game { } - public sealed partial class PileKind : pb::IMessage + public sealed partial class Image : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PileKind()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Image()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -371,97 +255,69 @@ namespace Game { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PileKind() { + public Image() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PileKind(PileKind other) : this() { - switch (other.KindCase) { - case KindOneofCase.Owned: - Owned = other.Owned; - break; - case KindOneofCase.Common: - Common = other.Common.Clone(); - break; - } - + public Image(Image other) : this() { + face_ = other.face_; + back_ = other.back_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PileKind Clone() { - return new PileKind(this); + public Image Clone() { + return new Image(this); } - /// Field number for the "owned" field. - public const int OwnedFieldNumber = 1; + /// Field number for the "face" field. + public const int FaceFieldNumber = 1; + private pb::ByteString face_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint Owned { - get { return kindCase_ == KindOneofCase.Owned ? (uint) kind_ : 0; } + public pb::ByteString Face { + get { return face_; } set { - kind_ = value; - kindCase_ = KindOneofCase.Owned; + face_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "common" field. - public const int CommonFieldNumber = 2; + /// Field number for the "back" field. + public const int BackFieldNumber = 2; + private pb::ByteString back_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Google.Protobuf.WellKnownTypes.Empty Common { - get { return kindCase_ == KindOneofCase.Common ? (global::Google.Protobuf.WellKnownTypes.Empty) kind_ : null; } + public pb::ByteString Back { + get { return back_; } set { - kind_ = value; - kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Common; + back_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - private object kind_; - /// Enum of possible cases for the "kind" oneof. - public enum KindOneofCase { - None = 0, - Owned = 1, - Common = 2, - } - private KindOneofCase kindCase_ = KindOneofCase.None; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public KindOneofCase KindCase { - get { return kindCase_; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void ClearKind() { - kindCase_ = KindOneofCase.None; - kind_ = null; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as PileKind); + return Equals(other as Image); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(PileKind other) { + public bool Equals(Image other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Owned != other.Owned) return false; - if (!object.Equals(Common, other.Common)) return false; - if (KindCase != other.KindCase) return false; + if (Face != other.Face) return false; + if (Back != other.Back) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (kindCase_ == KindOneofCase.Owned) hash ^= Owned.GetHashCode(); - if (kindCase_ == KindOneofCase.Common) hash ^= Common.GetHashCode(); - hash ^= (int) kindCase_; + if (Face.Length != 0) hash ^= Face.GetHashCode(); + if (Back.Length != 0) hash ^= Back.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -478,13 +334,13 @@ namespace Game { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (kindCase_ == KindOneofCase.Owned) { - output.WriteRawTag(8); - output.WriteUInt32(Owned); + if (Face.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Face); } - if (kindCase_ == KindOneofCase.Common) { + if (Back.Length != 0) { output.WriteRawTag(18); - output.WriteMessage(Common); + output.WriteBytes(Back); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -495,13 +351,13 @@ namespace Game { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (kindCase_ == KindOneofCase.Owned) { - output.WriteRawTag(8); - output.WriteUInt32(Owned); + if (Face.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Face); } - if (kindCase_ == KindOneofCase.Common) { + if (Back.Length != 0) { output.WriteRawTag(18); - output.WriteMessage(Common); + output.WriteBytes(Back); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -512,11 +368,11 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (kindCase_ == KindOneofCase.Owned) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Owned); + if (Face.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Face); } - if (kindCase_ == KindOneofCase.Common) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Common); + if (Back.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Back); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -525,22 +381,16 @@ namespace Game { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(PileKind other) { + public void MergeFrom(Image other) { if (other == null) { return; } - switch (other.KindCase) { - case KindOneofCase.Owned: - Owned = other.Owned; - break; - case KindOneofCase.Common: - if (Common == null) { - Common = new global::Google.Protobuf.WellKnownTypes.Empty(); - } - Common.MergeFrom(other.Common); - break; + if (other.Face.Length != 0) { + Face = other.Face; + } + if (other.Back.Length != 0) { + Back = other.Back; } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -555,17 +405,12 @@ namespace Game { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Owned = input.ReadUInt32(); + case 10: { + Face = input.ReadBytes(); break; } case 18: { - global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); - if (kindCase_ == KindOneofCase.Common) { - subBuilder.MergeFrom(Common); - } - input.ReadMessage(subBuilder); - Common = subBuilder; + Back = input.ReadBytes(); break; } } @@ -582,17 +427,12 @@ namespace Game { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - Owned = input.ReadUInt32(); + case 10: { + Face = input.ReadBytes(); break; } case 18: { - global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); - if (kindCase_ == KindOneofCase.Common) { - subBuilder.MergeFrom(Common); - } - input.ReadMessage(subBuilder); - Common = subBuilder; + Back = input.ReadBytes(); break; } } @@ -602,15 +442,15 @@ namespace Game { } - public sealed partial class CardId : pb::IMessage + public sealed partial class CardIndex : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardId()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardIndex()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -623,83 +463,114 @@ namespace Game { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardId() { + public CardIndex() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardId(CardId other) : this() { - pileKind_ = other.pileKind_ != null ? other.pileKind_.Clone() : null; - pileName_ = other.pileName_; - cardIndex_ = other.cardIndex_ != null ? other.cardIndex_.Clone() : null; + public CardIndex(CardIndex other) : this() { + switch (other.PosCase) { + case PosOneofCase.Index: + Index = other.Index; + break; + case PosOneofCase.Top: + Top = other.Top.Clone(); + break; + case PosOneofCase.Bottom: + Bottom = other.Bottom.Clone(); + break; + } + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardId Clone() { - return new CardId(this); + public CardIndex Clone() { + return new CardIndex(this); } - /// Field number for the "pileKind" field. - public const int PileKindFieldNumber = 1; - private global::Game.PileKind pileKind_; + /// Field number for the "index" field. + public const int IndexFieldNumber = 1; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Game.PileKind PileKind { - get { return pileKind_; } + public uint Index { + get { return posCase_ == PosOneofCase.Index ? (uint) pos_ : 0; } set { - pileKind_ = value; + pos_ = value; + posCase_ = PosOneofCase.Index; } } - /// Field number for the "pileName" field. - public const int PileNameFieldNumber = 2; - private string pileName_ = ""; + /// Field number for the "top" field. + public const int TopFieldNumber = 2; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string PileName { - get { return pileName_; } + public global::Google.Protobuf.WellKnownTypes.Empty Top { + get { return posCase_ == PosOneofCase.Top ? (global::Google.Protobuf.WellKnownTypes.Empty) pos_ : null; } set { - pileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + pos_ = value; + posCase_ = value == null ? PosOneofCase.None : PosOneofCase.Top; } } - /// Field number for the "cardIndex" field. - public const int CardIndexFieldNumber = 3; - private global::Game.CardIndex cardIndex_; + /// Field number for the "bottom" field. + public const int BottomFieldNumber = 3; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Game.CardIndex CardIndex { - get { return cardIndex_; } + public global::Google.Protobuf.WellKnownTypes.Empty Bottom { + get { return posCase_ == PosOneofCase.Bottom ? (global::Google.Protobuf.WellKnownTypes.Empty) pos_ : null; } set { - cardIndex_ = value; + pos_ = value; + posCase_ = value == null ? PosOneofCase.None : PosOneofCase.Bottom; } } + private object pos_; + /// Enum of possible cases for the "pos" oneof. + public enum PosOneofCase { + None = 0, + Index = 1, + Top = 2, + Bottom = 3, + } + private PosOneofCase posCase_ = PosOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PosOneofCase PosCase { + get { return posCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearPos() { + posCase_ = PosOneofCase.None; + pos_ = null; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as CardId); + return Equals(other as CardIndex); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(CardId other) { + public bool Equals(CardIndex other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(PileKind, other.PileKind)) return false; - if (PileName != other.PileName) return false; - if (!object.Equals(CardIndex, other.CardIndex)) return false; + if (Index != other.Index) return false; + if (!object.Equals(Top, other.Top)) return false; + if (!object.Equals(Bottom, other.Bottom)) return false; + if (PosCase != other.PosCase) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (pileKind_ != null) hash ^= PileKind.GetHashCode(); - if (PileName.Length != 0) hash ^= PileName.GetHashCode(); - if (cardIndex_ != null) hash ^= CardIndex.GetHashCode(); + if (posCase_ == PosOneofCase.Index) hash ^= Index.GetHashCode(); + if (posCase_ == PosOneofCase.Top) hash ^= Top.GetHashCode(); + if (posCase_ == PosOneofCase.Bottom) hash ^= Bottom.GetHashCode(); + hash ^= (int) posCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -716,17 +587,17 @@ namespace Game { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (pileKind_ != null) { - output.WriteRawTag(10); - output.WriteMessage(PileKind); + if (posCase_ == PosOneofCase.Index) { + output.WriteRawTag(8); + output.WriteUInt32(Index); } - if (PileName.Length != 0) { + if (posCase_ == PosOneofCase.Top) { output.WriteRawTag(18); - output.WriteString(PileName); + output.WriteMessage(Top); } - if (cardIndex_ != null) { + if (posCase_ == PosOneofCase.Bottom) { output.WriteRawTag(26); - output.WriteMessage(CardIndex); + output.WriteMessage(Bottom); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -737,17 +608,17 @@ namespace Game { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (pileKind_ != null) { - output.WriteRawTag(10); - output.WriteMessage(PileKind); + if (posCase_ == PosOneofCase.Index) { + output.WriteRawTag(8); + output.WriteUInt32(Index); } - if (PileName.Length != 0) { + if (posCase_ == PosOneofCase.Top) { output.WriteRawTag(18); - output.WriteString(PileName); + output.WriteMessage(Top); } - if (cardIndex_ != null) { + if (posCase_ == PosOneofCase.Bottom) { output.WriteRawTag(26); - output.WriteMessage(CardIndex); + output.WriteMessage(Bottom); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -758,14 +629,14 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (pileKind_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(PileKind); + if (posCase_ == PosOneofCase.Index) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Index); } - if (PileName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PileName); + if (posCase_ == PosOneofCase.Top) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Top); } - if (cardIndex_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(CardIndex); + if (posCase_ == PosOneofCase.Bottom) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bottom); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -774,25 +645,28 @@ namespace Game { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(CardId other) { + public void MergeFrom(CardIndex other) { if (other == null) { return; } - if (other.pileKind_ != null) { - if (pileKind_ == null) { - PileKind = new global::Game.PileKind(); - } - PileKind.MergeFrom(other.PileKind); - } - if (other.PileName.Length != 0) { - PileName = other.PileName; - } - if (other.cardIndex_ != null) { - if (cardIndex_ == null) { - CardIndex = new global::Game.CardIndex(); - } - CardIndex.MergeFrom(other.CardIndex); + switch (other.PosCase) { + case PosOneofCase.Index: + Index = other.Index; + break; + case PosOneofCase.Top: + if (Top == null) { + Top = new global::Google.Protobuf.WellKnownTypes.Empty(); + } + Top.MergeFrom(other.Top); + break; + case PosOneofCase.Bottom: + if (Bottom == null) { + Bottom = new global::Google.Protobuf.WellKnownTypes.Empty(); + } + Bottom.MergeFrom(other.Bottom); + break; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -807,22 +681,26 @@ namespace Game { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (pileKind_ == null) { - PileKind = new global::Game.PileKind(); - } - input.ReadMessage(PileKind); + case 8: { + Index = input.ReadUInt32(); break; } case 18: { - PileName = input.ReadString(); + global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); + if (posCase_ == PosOneofCase.Top) { + subBuilder.MergeFrom(Top); + } + input.ReadMessage(subBuilder); + Top = subBuilder; break; } case 26: { - if (cardIndex_ == null) { - CardIndex = new global::Game.CardIndex(); + global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); + if (posCase_ == PosOneofCase.Bottom) { + subBuilder.MergeFrom(Bottom); } - input.ReadMessage(CardIndex); + input.ReadMessage(subBuilder); + Bottom = subBuilder; break; } } @@ -839,22 +717,26 @@ namespace Game { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - if (pileKind_ == null) { - PileKind = new global::Game.PileKind(); - } - input.ReadMessage(PileKind); + case 8: { + Index = input.ReadUInt32(); break; } case 18: { - PileName = input.ReadString(); + global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); + if (posCase_ == PosOneofCase.Top) { + subBuilder.MergeFrom(Top); + } + input.ReadMessage(subBuilder); + Top = subBuilder; break; } case 26: { - if (cardIndex_ == null) { - CardIndex = new global::Game.CardIndex(); + global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); + if (posCase_ == PosOneofCase.Bottom) { + subBuilder.MergeFrom(Bottom); } - input.ReadMessage(CardIndex); + input.ReadMessage(subBuilder); + Bottom = subBuilder; break; } } @@ -864,6 +746,1308 @@ namespace Game { } + public sealed partial class PileKind : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PileKind()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Game.GameReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PileKind() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PileKind(PileKind other) : this() { + switch (other.KindCase) { + case KindOneofCase.Owned: + Owned = other.Owned; + break; + case KindOneofCase.Common: + Common = other.Common.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PileKind Clone() { + return new PileKind(this); + } + + /// Field number for the "owned" field. + public const int OwnedFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Owned { + get { return kindCase_ == KindOneofCase.Owned ? (uint) kind_ : 0; } + set { + kind_ = value; + kindCase_ = KindOneofCase.Owned; + } + } + + /// Field number for the "common" field. + public const int CommonFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Google.Protobuf.WellKnownTypes.Empty Common { + get { return kindCase_ == KindOneofCase.Common ? (global::Google.Protobuf.WellKnownTypes.Empty) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Common; + } + } + + private object kind_; + /// Enum of possible cases for the "kind" oneof. + public enum KindOneofCase { + None = 0, + Owned = 1, + Common = 2, + } + private KindOneofCase kindCase_ = KindOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KindOneofCase KindCase { + get { return kindCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearKind() { + kindCase_ = KindOneofCase.None; + kind_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as PileKind); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(PileKind other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Owned != other.Owned) return false; + if (!object.Equals(Common, other.Common)) return false; + if (KindCase != other.KindCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (kindCase_ == KindOneofCase.Owned) hash ^= Owned.GetHashCode(); + if (kindCase_ == KindOneofCase.Common) hash ^= Common.GetHashCode(); + hash ^= (int) kindCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (kindCase_ == KindOneofCase.Owned) { + output.WriteRawTag(8); + output.WriteUInt32(Owned); + } + if (kindCase_ == KindOneofCase.Common) { + output.WriteRawTag(18); + output.WriteMessage(Common); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (kindCase_ == KindOneofCase.Owned) { + output.WriteRawTag(8); + output.WriteUInt32(Owned); + } + if (kindCase_ == KindOneofCase.Common) { + output.WriteRawTag(18); + output.WriteMessage(Common); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (kindCase_ == KindOneofCase.Owned) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Owned); + } + if (kindCase_ == KindOneofCase.Common) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Common); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(PileKind other) { + if (other == null) { + return; + } + switch (other.KindCase) { + case KindOneofCase.Owned: + Owned = other.Owned; + break; + case KindOneofCase.Common: + if (Common == null) { + Common = new global::Google.Protobuf.WellKnownTypes.Empty(); + } + Common.MergeFrom(other.Common); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Owned = input.ReadUInt32(); + break; + } + case 18: { + global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); + if (kindCase_ == KindOneofCase.Common) { + subBuilder.MergeFrom(Common); + } + input.ReadMessage(subBuilder); + Common = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Owned = input.ReadUInt32(); + break; + } + case 18: { + global::Google.Protobuf.WellKnownTypes.Empty subBuilder = new global::Google.Protobuf.WellKnownTypes.Empty(); + if (kindCase_ == KindOneofCase.Common) { + subBuilder.MergeFrom(Common); + } + input.ReadMessage(subBuilder); + Common = subBuilder; + break; + } + } + } + } + #endif + + } + + public sealed partial class CardId : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardId()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Game.GameReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CardId() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CardId(CardId other) : this() { + pileKind_ = other.pileKind_ != null ? other.pileKind_.Clone() : null; + pileName_ = other.pileName_; + cardIndex_ = other.cardIndex_ != null ? other.cardIndex_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CardId Clone() { + return new CardId(this); + } + + /// Field number for the "pileKind" field. + public const int PileKindFieldNumber = 1; + private global::Game.PileKind pileKind_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.PileKind PileKind { + get { return pileKind_; } + set { + pileKind_ = value; + } + } + + /// Field number for the "pileName" field. + public const int PileNameFieldNumber = 2; + private string pileName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string PileName { + get { return pileName_; } + set { + pileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "cardIndex" field. + public const int CardIndexFieldNumber = 3; + private global::Game.CardIndex cardIndex_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.CardIndex CardIndex { + get { return cardIndex_; } + set { + cardIndex_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CardId); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CardId other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(PileKind, other.PileKind)) return false; + if (PileName != other.PileName) return false; + if (!object.Equals(CardIndex, other.CardIndex)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (pileKind_ != null) hash ^= PileKind.GetHashCode(); + if (PileName.Length != 0) hash ^= PileName.GetHashCode(); + if (cardIndex_ != null) hash ^= CardIndex.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (pileKind_ != null) { + output.WriteRawTag(10); + output.WriteMessage(PileKind); + } + if (PileName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(PileName); + } + if (cardIndex_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CardIndex); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (pileKind_ != null) { + output.WriteRawTag(10); + output.WriteMessage(PileKind); + } + if (PileName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(PileName); + } + if (cardIndex_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CardIndex); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (pileKind_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PileKind); + } + if (PileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PileName); + } + if (cardIndex_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CardIndex); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CardId other) { + if (other == null) { + return; + } + if (other.pileKind_ != null) { + if (pileKind_ == null) { + PileKind = new global::Game.PileKind(); + } + PileKind.MergeFrom(other.PileKind); + } + if (other.PileName.Length != 0) { + PileName = other.PileName; + } + if (other.cardIndex_ != null) { + if (cardIndex_ == null) { + CardIndex = new global::Game.CardIndex(); + } + CardIndex.MergeFrom(other.CardIndex); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (pileKind_ == null) { + PileKind = new global::Game.PileKind(); + } + input.ReadMessage(PileKind); + break; + } + case 18: { + PileName = input.ReadString(); + break; + } + case 26: { + if (cardIndex_ == null) { + CardIndex = new global::Game.CardIndex(); + } + input.ReadMessage(CardIndex); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (pileKind_ == null) { + PileKind = new global::Game.PileKind(); + } + input.ReadMessage(PileKind); + break; + } + case 18: { + PileName = input.ReadString(); + break; + } + case 26: { + if (cardIndex_ == null) { + CardIndex = new global::Game.CardIndex(); + } + input.ReadMessage(CardIndex); + break; + } + } + } + } + #endif + + } + + public sealed partial class MessageStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Game.GameReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageStatus(MessageStatus other) : this() { + commonPiles_ = other.commonPiles_ != null ? other.commonPiles_.Clone() : null; + playerPiles_ = other.playerPiles_.Clone(); + currentTurn_ = other.currentTurn_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageStatus Clone() { + return new MessageStatus(this); + } + + /// Field number for the "commonPiles" field. + public const int CommonPilesFieldNumber = 1; + private global::Game.MessageStatus.Types.Piles commonPiles_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.MessageStatus.Types.Piles CommonPiles { + get { return commonPiles_; } + set { + commonPiles_ = value; + } + } + + /// Field number for the "playerPiles" field. + public const int PlayerPilesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_playerPiles_codec + = pb::FieldCodec.ForMessage(18, global::Game.MessageStatus.Types.Piles.Parser); + private readonly pbc::RepeatedField playerPiles_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PlayerPiles { + get { return playerPiles_; } + } + + /// Field number for the "currentTurn" field. + public const int CurrentTurnFieldNumber = 3; + private uint currentTurn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint CurrentTurn { + get { return currentTurn_; } + set { + currentTurn_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MessageStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MessageStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(CommonPiles, other.CommonPiles)) return false; + if(!playerPiles_.Equals(other.playerPiles_)) return false; + if (CurrentTurn != other.CurrentTurn) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (commonPiles_ != null) hash ^= CommonPiles.GetHashCode(); + hash ^= playerPiles_.GetHashCode(); + if (CurrentTurn != 0) hash ^= CurrentTurn.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (commonPiles_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CommonPiles); + } + playerPiles_.WriteTo(output, _repeated_playerPiles_codec); + if (CurrentTurn != 0) { + output.WriteRawTag(24); + output.WriteUInt32(CurrentTurn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (commonPiles_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CommonPiles); + } + playerPiles_.WriteTo(ref output, _repeated_playerPiles_codec); + if (CurrentTurn != 0) { + output.WriteRawTag(24); + output.WriteUInt32(CurrentTurn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (commonPiles_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CommonPiles); + } + size += playerPiles_.CalculateSize(_repeated_playerPiles_codec); + if (CurrentTurn != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(CurrentTurn); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MessageStatus other) { + if (other == null) { + return; + } + if (other.commonPiles_ != null) { + if (commonPiles_ == null) { + CommonPiles = new global::Game.MessageStatus.Types.Piles(); + } + CommonPiles.MergeFrom(other.CommonPiles); + } + playerPiles_.Add(other.playerPiles_); + if (other.CurrentTurn != 0) { + CurrentTurn = other.CurrentTurn; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (commonPiles_ == null) { + CommonPiles = new global::Game.MessageStatus.Types.Piles(); + } + input.ReadMessage(CommonPiles); + break; + } + case 18: { + playerPiles_.AddEntriesFrom(input, _repeated_playerPiles_codec); + break; + } + case 24: { + CurrentTurn = input.ReadUInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (commonPiles_ == null) { + CommonPiles = new global::Game.MessageStatus.Types.Piles(); + } + input.ReadMessage(CommonPiles); + break; + } + case 18: { + playerPiles_.AddEntriesFrom(ref input, _repeated_playerPiles_codec); + break; + } + case 24: { + CurrentTurn = input.ReadUInt32(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the MessageStatus message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class Card : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Card()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Game.MessageStatus.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Card() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Card(Card other) : this() { + kind_ = other.kind_ != null ? other.kind_.Clone() : null; + visible_ = other.visible_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Card Clone() { + return new Card(this); + } + + /// Field number for the "kind" field. + public const int KindFieldNumber = 1; + private global::Game.CardKind kind_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.CardKind Kind { + get { return kind_; } + set { + kind_ = value; + } + } + + /// Field number for the "visible" field. + public const int VisibleFieldNumber = 2; + private bool visible_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Visible { + get { return visible_; } + set { + visible_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Card); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Card other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Kind, other.Kind)) return false; + if (Visible != other.Visible) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (kind_ != null) hash ^= Kind.GetHashCode(); + if (Visible != false) hash ^= Visible.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (kind_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Kind); + } + if (Visible != false) { + output.WriteRawTag(16); + output.WriteBool(Visible); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (kind_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Kind); + } + if (Visible != false) { + output.WriteRawTag(16); + output.WriteBool(Visible); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (kind_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Kind); + } + if (Visible != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Card other) { + if (other == null) { + return; + } + if (other.kind_ != null) { + if (kind_ == null) { + Kind = new global::Game.CardKind(); + } + Kind.MergeFrom(other.Kind); + } + if (other.Visible != false) { + Visible = other.Visible; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (kind_ == null) { + Kind = new global::Game.CardKind(); + } + input.ReadMessage(Kind); + break; + } + case 16: { + Visible = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (kind_ == null) { + Kind = new global::Game.CardKind(); + } + input.ReadMessage(Kind); + break; + } + case 16: { + Visible = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + public sealed partial class Pile : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Pile()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Game.MessageStatus.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Pile() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Pile(Pile other) : this() { + cards_ = other.cards_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Pile Clone() { + return new Pile(this); + } + + /// Field number for the "cards" field. + public const int CardsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_cards_codec + = pb::FieldCodec.ForMessage(10, global::Game.MessageStatus.Types.Card.Parser); + private readonly pbc::RepeatedField cards_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Cards { + get { return cards_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Pile); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Pile other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!cards_.Equals(other.cards_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= cards_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + cards_.WriteTo(output, _repeated_cards_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + cards_.WriteTo(ref output, _repeated_cards_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += cards_.CalculateSize(_repeated_cards_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Pile other) { + if (other == null) { + return; + } + cards_.Add(other.cards_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + cards_.AddEntriesFrom(input, _repeated_cards_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + cards_.AddEntriesFrom(ref input, _repeated_cards_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class Piles : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Piles()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Game.MessageStatus.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Piles() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Piles(Piles other) : this() { + piles_ = other.piles_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Piles Clone() { + return new Piles(this); + } + + /// Field number for the "piles" field. + public const int Piles_FieldNumber = 1; + private static readonly pbc::MapField.Codec _map_piles_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Game.MessageStatus.Types.Pile.Parser), 10); + private readonly pbc::MapField piles_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField Piles_ { + get { return piles_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Piles); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Piles other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Piles_.Equals(other.Piles_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= Piles_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + piles_.WriteTo(output, _map_piles_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + piles_.WriteTo(ref output, _map_piles_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += piles_.CalculateSize(_map_piles_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Piles other) { + if (other == null) { + return; + } + piles_.Add(other.piles_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + piles_.AddEntriesFrom(input, _map_piles_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + piles_.AddEntriesFrom(ref input, _map_piles_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + #endregion } diff --git a/unity/Assets/Scripts/grpc/GameGrpc.cs b/unity/Assets/Scripts/grpc/GameGrpc.cs index 5816812..ffed118 100644 --- a/unity/Assets/Scripts/grpc/GameGrpc.cs +++ b/unity/Assets/Scripts/grpc/GameGrpc.cs @@ -45,8 +45,18 @@ namespace Game { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + static readonly grpc::Marshaller __Marshaller_game_CardKind = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.CardKind.Parser)); + static readonly grpc::Marshaller __Marshaller_game_Image = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Image.Parser)); static readonly grpc::Marshaller __Marshaller_game_CardId = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.CardId.Parser)); static readonly grpc::Marshaller __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser)); + static readonly grpc::Marshaller __Marshaller_game_MessageStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.MessageStatus.Parser)); + + static readonly grpc::Method __Method_getCardImage = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "getCardImage", + __Marshaller_game_CardKind, + __Marshaller_game_Image); static readonly grpc::Method __Method_onClick = new grpc::Method( grpc::MethodType.Unary, @@ -55,6 +65,13 @@ namespace Game { __Marshaller_game_CardId, __Marshaller_google_protobuf_Empty); + static readonly grpc::Method __Method_status = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "status", + __Marshaller_google_protobuf_Empty, + __Marshaller_game_MessageStatus); + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { @@ -65,17 +82,21 @@ namespace Game { [grpc::BindServiceMethod(typeof(Game), "BindService")] public abstract partial class GameBase { - /// - /// TODO add status - /// - /// The request received from the client. - /// The context of the server-side call handler being invoked. - /// The response to send back to the client (wrapped by a task). + public virtual global::System.Threading.Tasks.Task getCardImage(global::Game.CardKind request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + public virtual global::System.Threading.Tasks.Task onClick(global::Game.CardId request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } + public virtual global::System.Threading.Tasks.Task status(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + } /// Client for Game @@ -101,50 +122,54 @@ namespace Game { { } - /// - /// TODO add status - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The response received from the server. + public virtual global::Game.Image getCardImage(global::Game.CardKind request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return getCardImage(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + public virtual global::Game.Image getCardImage(global::Game.CardKind request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_getCardImage, null, options, request); + } + public virtual grpc::AsyncUnaryCall getCardImageAsync(global::Game.CardKind request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return getCardImageAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + public virtual grpc::AsyncUnaryCall getCardImageAsync(global::Game.CardKind request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_getCardImage, null, options, request); + } public virtual global::Google.Protobuf.WellKnownTypes.Empty onClick(global::Game.CardId request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return onClick(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } - /// - /// TODO add status - /// - /// The request to send to the server. - /// The options for the call. - /// The response received from the server. public virtual global::Google.Protobuf.WellKnownTypes.Empty onClick(global::Game.CardId request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_onClick, null, options, request); } - /// - /// TODO add status - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. public virtual grpc::AsyncUnaryCall onClickAsync(global::Game.CardId request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return onClickAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } - /// - /// TODO add status - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. public virtual grpc::AsyncUnaryCall onClickAsync(global::Game.CardId request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_onClick, null, options, request); } + public virtual global::Game.MessageStatus status(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return status(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + public virtual global::Game.MessageStatus status(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_status, null, options, request); + } + public virtual grpc::AsyncUnaryCall statusAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return statusAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + public virtual grpc::AsyncUnaryCall statusAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_status, null, options, request); + } /// Creates a new instance of client from given ClientBaseConfiguration. protected override GameClient NewInstance(ClientBaseConfiguration configuration) { @@ -157,7 +182,9 @@ namespace Game { public static grpc::ServerServiceDefinition BindService(GameBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_onClick, serviceImpl.onClick).Build(); + .AddMethod(__Method_getCardImage, serviceImpl.getCardImage) + .AddMethod(__Method_onClick, serviceImpl.onClick) + .AddMethod(__Method_status, serviceImpl.status).Build(); } /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. @@ -166,7 +193,9 @@ namespace Game { /// An object implementing the server-side handling logic. public static void BindService(grpc::ServiceBinderBase serviceBinder, GameBase serviceImpl) { + serviceBinder.AddMethod(__Method_getCardImage, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.getCardImage)); serviceBinder.AddMethod(__Method_onClick, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.onClick)); + serviceBinder.AddMethod(__Method_status, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.status)); } } diff --git a/unity/Assets/Scripts/grpc/Lobby.cs b/unity/Assets/Scripts/grpc/Lobby.cs index 0cf1f35..670cd7b 100644 --- a/unity/Assets/Scripts/grpc/Lobby.cs +++ b/unity/Assets/Scripts/grpc/Lobby.cs @@ -28,28 +28,24 @@ namespace Lobby { "bXAucHJvdG8aG2dvb2dsZS9wcm90b2J1Zi9lbXB0eS5wcm90bxoMY29tbW9u", "LnByb3RvIh0KDEhhc05ld1N0YXR1cxINCgV2YWx1ZRgBIAEoCCJOChNMYXN0", "U3RhdHVzVGltZXN0YW1wEigKBHRpbWUYASABKAsyGi5nb29nbGUucHJvdG9i", - "dWYuVGltZXN0YW1wEg0KBWxvYmJ5GAIgASgNIigKBkNhcmRJRBIOCgZnYW1l", - "SWQYASABKA0SDgoGY2FyZElkGAIgASgJIhgKBUltYWdlEg8KB2NvbnRlbnQY", - "ASABKAwiMwoEVm90ZRIOCgZwbGF5ZXIYASABKAkSDAoEZ2FtZRgCIAEoDRIN", - "CgVyZWFkeRgDIAEoCCIaCgpTaW5nbGVWb3RlEgwKBGdhbWUYAiABKA0iWgoL", - "TG9iYnlTdGF0dXMSGwoFbmFtZXMYASADKAsyDC5jb21tb24uTmFtZRIaCgV2", - "b3RlcxgCIAMoCzILLmxvYmJ5LlZvdGUSEgoKaXNTdGFydGluZxgDIAEoCDKE", - "AwoFTG9iYnkSKwoMZ2V0Q2FyZEltYWdlEg0ubG9iYnkuQ2FyZElEGgwubG9i", - "YnkuSW1hZ2USLwoFdXNlcnMSFi5nb29nbGUucHJvdG9idWYuRW1wdHkaDC5j", - "b21tb24uTmFtZTABEjEKBHZvdGUSES5sb2JieS5TaW5nbGVWb3RlGhYuZ29v", - "Z2xlLnByb3RvYnVmLkVtcHR5EjcKBXJlYWR5EhYuZ29vZ2xlLnByb3RvYnVm", - "LkVtcHR5GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Ej8KDGhhc05ld1N0YXR1", - "cxIaLmxvYmJ5Lkxhc3RTdGF0dXNUaW1lc3RhbXAaEy5sb2JieS5IYXNOZXdT", - "dGF0dXMSNwoJZ2V0U3RhdHVzEhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GhIu", - "bG9iYnkuTG9iYnlTdGF0dXMSNwoFbGVhdmUSFi5nb29nbGUucHJvdG9idWYu", - "RW1wdHkaFi5nb29nbGUucHJvdG9idWYuRW1wdHliBnByb3RvMw==")); + "dWYuVGltZXN0YW1wEg0KBWxvYmJ5GAIgASgNIjMKBFZvdGUSDgoGcGxheWVy", + "GAEgASgJEgwKBGdhbWUYAiABKA0SDQoFcmVhZHkYAyABKAgiGgoKU2luZ2xl", + "Vm90ZRIMCgRnYW1lGAIgASgNIloKC0xvYmJ5U3RhdHVzEhsKBW5hbWVzGAEg", + "AygLMgwuY29tbW9uLk5hbWUSGgoFdm90ZXMYAiADKAsyCy5sb2JieS5Wb3Rl", + "EhIKCmlzU3RhcnRpbmcYAyABKAgy1wIKBUxvYmJ5Ei8KBXVzZXJzEhYuZ29v", + "Z2xlLnByb3RvYnVmLkVtcHR5GgwuY29tbW9uLk5hbWUwARIxCgR2b3RlEhEu", + "bG9iYnkuU2luZ2xlVm90ZRoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRI3CgVy", + "ZWFkeRIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRoWLmdvb2dsZS5wcm90b2J1", + "Zi5FbXB0eRI/CgxoYXNOZXdTdGF0dXMSGi5sb2JieS5MYXN0U3RhdHVzVGlt", + "ZXN0YW1wGhMubG9iYnkuSGFzTmV3U3RhdHVzEjcKCWdldFN0YXR1cxIWLmdv", + "b2dsZS5wcm90b2J1Zi5FbXB0eRoSLmxvYmJ5LkxvYmJ5U3RhdHVzEjcKBWxl", + "YXZlEhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GhYuZ29vZ2xlLnByb3RvYnVm", + "LkVtcHR5YgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Common.CommonReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.HasNewStatus), global::Lobby.HasNewStatus.Parser, new[]{ "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.LastStatusTimestamp), global::Lobby.LastStatusTimestamp.Parser, new[]{ "Time", "Lobby" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.CardID), global::Lobby.CardID.Parser, new[]{ "GameId", "CardId" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.Image), global::Lobby.Image.Parser, new[]{ "Content" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.Vote), global::Lobby.Vote.Parser, new[]{ "Player", "Game", "Ready" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.SingleVote), global::Lobby.SingleVote.Parser, new[]{ "Game" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Lobby.LobbyStatus), global::Lobby.LobbyStatus.Parser, new[]{ "Names", "Votes", "IsStarting" }, null, null, null, null) @@ -448,386 +444,6 @@ namespace Lobby { } - public sealed partial class CardID : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CardID()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[2]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardID() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardID(CardID other) : this() { - gameId_ = other.gameId_; - cardId_ = other.cardId_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CardID Clone() { - return new CardID(this); - } - - /// Field number for the "gameId" field. - public const int GameIdFieldNumber = 1; - private uint gameId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint GameId { - get { return gameId_; } - set { - gameId_ = value; - } - } - - /// Field number for the "cardId" field. - public const int CardIdFieldNumber = 2; - private string cardId_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string CardId { - get { return cardId_; } - set { - cardId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as CardID); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(CardID other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (GameId != other.GameId) return false; - if (CardId != other.CardId) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (GameId != 0) hash ^= GameId.GetHashCode(); - if (CardId.Length != 0) hash ^= CardId.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (GameId != 0) { - output.WriteRawTag(8); - output.WriteUInt32(GameId); - } - if (CardId.Length != 0) { - output.WriteRawTag(18); - output.WriteString(CardId); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (GameId != 0) { - output.WriteRawTag(8); - output.WriteUInt32(GameId); - } - if (CardId.Length != 0) { - output.WriteRawTag(18); - output.WriteString(CardId); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (GameId != 0) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(GameId); - } - if (CardId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(CardId); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(CardID other) { - if (other == null) { - return; - } - if (other.GameId != 0) { - GameId = other.GameId; - } - if (other.CardId.Length != 0) { - CardId = other.CardId; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - GameId = input.ReadUInt32(); - break; - } - case 18: { - CardId = input.ReadString(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - GameId = input.ReadUInt32(); - break; - } - case 18: { - CardId = input.ReadString(); - break; - } - } - } - } - #endif - - } - - public sealed partial class Image : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Image()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[3]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Image() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Image(Image other) : this() { - content_ = other.content_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Image Clone() { - return new Image(this); - } - - /// Field number for the "content" field. - public const int ContentFieldNumber = 1; - private pb::ByteString content_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Content { - get { return content_; } - set { - content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as Image); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Image other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Content != other.Content) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Content.Length != 0) hash ^= Content.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (Content.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(Content); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Content.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(Content); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Content.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Content); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Image other) { - if (other == null) { - return; - } - if (other.Content.Length != 0) { - Content = other.Content; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - Content = input.ReadBytes(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 10: { - Content = input.ReadBytes(); - break; - } - } - } - } - #endif - - } - public sealed partial class Vote : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -840,7 +456,7 @@ namespace Lobby { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[4]; } + get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1084,7 +700,7 @@ namespace Lobby { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[5]; } + get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1256,7 +872,7 @@ namespace Lobby { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[6]; } + get { return global::Lobby.LobbyReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/unity/Assets/Scripts/grpc/LobbyGrpc.cs b/unity/Assets/Scripts/grpc/LobbyGrpc.cs index 0fba8ec..f85246d 100644 --- a/unity/Assets/Scripts/grpc/LobbyGrpc.cs +++ b/unity/Assets/Scripts/grpc/LobbyGrpc.cs @@ -45,8 +45,6 @@ namespace Lobby { return parser.ParseFrom(context.PayloadAsNewBuffer()); } - static readonly grpc::Marshaller __Marshaller_lobby_CardID = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Lobby.CardID.Parser)); - static readonly grpc::Marshaller __Marshaller_lobby_Image = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Lobby.Image.Parser)); static readonly grpc::Marshaller __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser)); static readonly grpc::Marshaller __Marshaller_common_Name = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Common.Name.Parser)); static readonly grpc::Marshaller __Marshaller_lobby_SingleVote = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Lobby.SingleVote.Parser)); @@ -54,13 +52,6 @@ namespace Lobby { static readonly grpc::Marshaller __Marshaller_lobby_HasNewStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Lobby.HasNewStatus.Parser)); static readonly grpc::Marshaller __Marshaller_lobby_LobbyStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Lobby.LobbyStatus.Parser)); - static readonly grpc::Method __Method_getCardImage = new grpc::Method( - grpc::MethodType.Unary, - __ServiceName, - "getCardImage", - __Marshaller_lobby_CardID, - __Marshaller_lobby_Image); - static readonly grpc::Method __Method_users = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, @@ -113,11 +104,6 @@ namespace Lobby { [grpc::BindServiceMethod(typeof(Lobby), "BindService")] public abstract partial class LobbyBase { - public virtual global::System.Threading.Tasks.Task getCardImage(global::Lobby.CardID request, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - public virtual global::System.Threading.Tasks.Task users(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -173,22 +159,6 @@ namespace Lobby { { } - public virtual global::Lobby.Image getCardImage(global::Lobby.CardID request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return getCardImage(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - public virtual global::Lobby.Image getCardImage(global::Lobby.CardID request, grpc::CallOptions options) - { - return CallInvoker.BlockingUnaryCall(__Method_getCardImage, null, options, request); - } - public virtual grpc::AsyncUnaryCall getCardImageAsync(global::Lobby.CardID request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return getCardImageAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - public virtual grpc::AsyncUnaryCall getCardImageAsync(global::Lobby.CardID request, grpc::CallOptions options) - { - return CallInvoker.AsyncUnaryCall(__Method_getCardImage, null, options, request); - } public virtual grpc::AsyncServerStreamingCall users(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return users(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -289,7 +259,6 @@ namespace Lobby { public static grpc::ServerServiceDefinition BindService(LobbyBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_getCardImage, serviceImpl.getCardImage) .AddMethod(__Method_users, serviceImpl.users) .AddMethod(__Method_vote, serviceImpl.vote) .AddMethod(__Method_ready, serviceImpl.ready) @@ -304,7 +273,6 @@ namespace Lobby { /// An object implementing the server-side handling logic. public static void BindService(grpc::ServiceBinderBase serviceBinder, LobbyBase serviceImpl) { - serviceBinder.AddMethod(__Method_getCardImage, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.getCardImage)); serviceBinder.AddMethod(__Method_users, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.users)); serviceBinder.AddMethod(__Method_vote, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.vote)); serviceBinder.AddMethod(__Method_ready, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ready));