From e92980ee9714b4bdc553b8df1dbe0df458365837 Mon Sep 17 00:00:00 2001 From: ThePerkinrex Date: Sun, 31 Oct 2021 15:17:37 +0100 Subject: [PATCH] Finish query images --- server/src/server/game.rs | 43 +- unity/Assets/Scripts/Client.cs | 60 +- unity/Assets/Scripts/Images.cs | 57 ++ unity/Assets/Scripts/Images.cs.meta | 11 + unity/Assets/Scripts/grpc/Game.cs | 1103 ++++++++++++++++++++++++- unity/Assets/Scripts/grpc/Protocol.cs | 140 +++- 6 files changed, 1350 insertions(+), 64 deletions(-) create mode 100644 unity/Assets/Scripts/Images.cs create mode 100644 unity/Assets/Scripts/Images.cs.meta diff --git a/server/src/server/game.rs b/server/src/server/game.rs index 722809c..5b202e7 100644 --- a/server/src/server/game.rs +++ b/server/src/server/game.rs @@ -1,4 +1,8 @@ -use std::{fs::File, path::Path}; +use std::{ + collections::{hash_map::Entry, HashMap}, + fs::File, + path::{Path, PathBuf}, +}; use super::{ protos::game::{game_status::Piles, CardKind, Cards, GameStatus, Image}, @@ -23,7 +27,7 @@ use crate::{ use anyhow::{anyhow, Result}; use bytes::{Buf, Bytes}; use libflate::deflate::Encoder; -use tar::Builder; +use tar::{Builder, Header}; pub(super) async fn get_status( data: &mut ServiceData, @@ -205,6 +209,7 @@ pub(super) async fn get_cards_images( }; let game = &data.games[game_id as usize]; let mut ar = Builder::new(Encoder::new(Vec::new())); + let mut pathsUsed: HashMap = HashMap::new(); for card_kind in cards.cards { let (face, back) = game.get_card_paths(&card_kind.kind); // log::info!("Loading face image [{:?}]", time.elapsed()); @@ -226,19 +231,33 @@ pub(super) async fn get_cards_images( } if is_newer(&card_kind, &face) { - ar.append_file( - format!("{}/face.png", card_kind.kind), - &mut File::open(face).unwrap(), - ) - .unwrap(); + let new_path = format!("{}/face.png", card_kind.kind); + if let Entry::Vacant(e) = pathsUsed.entry(face.clone()) { + ar.append_file(&new_path, &mut File::open(&face).unwrap()) + .unwrap(); + e.insert(new_path); + } else { + let mut header = Header::new_gnu(); + header.set_cksum(); + let b = pathsUsed.get(&face).unwrap().as_bytes(); + header.set_size(b.len() as u64); + ar.append_data(&mut header, format!("{}/face.ref.txt", card_kind.kind), b).unwrap(); + } } if is_newer(&card_kind, &back) { - ar.append_file( - format!("{}/back.png", card_kind.kind), - &mut File::open(back).unwrap(), - ) - .unwrap(); + let new_path = format!("{}/back.png", card_kind.kind); + if let Entry::Vacant(e) = pathsUsed.entry(back.clone()) { + ar.append_file(&new_path, &mut File::open(&back).unwrap()) + .unwrap(); + e.insert(new_path); + } else { + let mut header = Header::new_gnu(); + header.set_cksum(); + let b = pathsUsed.get(&back).unwrap().as_bytes(); + header.set_size(b.len() as u64); + ar.append_data(&mut header, format!("{}/back.ref.txt", card_kind.kind), b).unwrap(); + } } } let mut b = Bytes::from(ar.into_inner().unwrap().finish().into_result().unwrap()); diff --git a/unity/Assets/Scripts/Client.cs b/unity/Assets/Scripts/Client.cs index 9f5de4f..a9f9918 100644 --- a/unity/Assets/Scripts/Client.cs +++ b/unity/Assets/Scripts/Client.cs @@ -8,6 +8,7 @@ using Utilities; using System.Net; using System; using Empty = Google.Protobuf.WellKnownTypes.Empty; +using System.IO; public class Client : MonoBehaviour { private static ConnectionImpl reference; @@ -49,7 +50,15 @@ public class Client : MonoBehaviour { private Dictionary> returnUsersHandlers = new Dictionary>(); private Dictionary> lobbyStatusHandlers = new Dictionary>(); private Dictionary> returnCardImageHandlers = new Dictionary>(); + private Dictionary> returnCardImagesHandlers = new Dictionary>(); private Dictionary> gameStatusHandlers = new Dictionary>(); + + private int currentImagesPacketLength = 0; + private int currentImagesPacketIndex = 0; + + private MemoryStream currentImages; + + public ConcurrentQueue queue; public void Update() { @@ -120,6 +129,29 @@ public class Client : MonoBehaviour { } } break; + case Protocol.ServerClientPacket.DataOneofCase.ReturnCardsImages: { + if (p.ReturnCardsImages.Setup != null) { + this.currentImagesPacketLength = (int)p.ReturnCardsImages.Setup.Number; + this.currentImagesPacketIndex = 0; + this.currentImages = new MemoryStream(); + + } else { + if (p.ReturnCardsImages.DataPacket.Id != this.currentImagesPacketIndex) + throw new Exception("images packet id doesn't match expected"); + this.currentImages.Write(p.ReturnCardsImages.DataPacket.Data.ToArray(), 0, p.ReturnCardsImages.DataPacket.Data.Length); + this.currentImagesPacketIndex++; + if (this.currentImagesPacketIndex == this.currentImagesPacketLength) { + Images i = new Images(this.currentImages); + this.currentImagesPacketIndex = 0; + var v = new Action[this.returnCardImagesHandlers.Count]; + this.returnCardImagesHandlers.Values.CopyTo(v, 0); + foreach (var n in v) { + n(i); + } + } + } + } + break; case Protocol.ServerClientPacket.DataOneofCase.GameStatus: { var v = new Action[this.gameStatusHandlers.Count]; this.gameStatusHandlers.Values.CopyTo(v, 0); @@ -166,6 +198,10 @@ public class Client : MonoBehaviour { returnCardImageHandlers.Add(name, handler); } + public void AddHandler(string name, Action handler) { + returnCardImagesHandlers.Add(name, handler); + } + public void AddHandler(string name, Action handler) { gameStatusHandlers.Add(name, handler); } @@ -196,6 +232,9 @@ public class Client : MonoBehaviour { case Protocol.ServerClientPacket.DataOneofCase.ReturnCardImage: returnCardImageHandlers.Remove(name); break; + case Protocol.ServerClientPacket.DataOneofCase.ReturnCardsImages: + returnCardImagesHandlers.Remove(name); + break; case Protocol.ServerClientPacket.DataOneofCase.GameStatus: gameStatusHandlers.Remove(name); break; @@ -274,7 +313,7 @@ public class Client : MonoBehaviour { public List GetLobbyVotes(uint game) { var gameVotes = new List(); - if (lobby_status.Get() != null){ + if (lobby_status.Get() != null) { Google.Protobuf.Collections.RepeatedField votes = lobby_status.Get()?.Votes; foreach (Lobby.Vote vote in votes) { if (vote.Game == game) { @@ -331,9 +370,16 @@ public class Client : MonoBehaviour { conn.SendMessage(new Protocol.ClientServerPacket() { QueryPublicLobbies = new Empty() }); } - public void GetCardImage(string cardKind) { + public void GetCardImage(string cardKind) { conn.SendMessage(new Protocol.ClientServerPacket() { QueryCardImage = new Game.CardKind { Kind = cardKind } }); } + + public void GetCardImages(string cardKind) { + Game.Cards c = new Game.Cards(); + c.Cards_.Append(new Game.Cards.Types.Card { Kind = cardKind, Time = new Google.Protobuf.WellKnownTypes.Timestamp { Seconds = 0, Nanos = 0 } }); + conn.SendMessage(new Protocol.ClientServerPacket() { QueryCardImages = c }); + } + public int GetUserIndex(string user) { if (game_status.Get() != null) return game_status.Get().Names.IndexOf(new Common.Name { Name_ = user }); else return -1; @@ -344,8 +390,8 @@ public class Client : MonoBehaviour { return game_status.Get().PlayerPiles[idx].Piles_; } return null; - } - public Google.Protobuf.Collections.MapField GetCommonPiles() { + } + public Google.Protobuf.Collections.MapField GetCommonPiles() { if (game_status.Get() != null) return game_status.Get().CommonPiles.Piles_; else return null; } @@ -353,7 +399,7 @@ public class Client : MonoBehaviour { Game.PileKind pileKind = new Game.PileKind() { Owned = (uint)GetUserIndex(user) }; if (isCommonPile) pileKind = new Game.PileKind { Common = new Empty() }; conn.SendMessage(new Protocol.ClientServerPacket() { CallOnClick = new Game.CardId { PileKind = pileKind, CardIndex = new Game.CardIndex { Index = (uint)cardIdx }, PileName = pileName } }); - } + } // public Dictionary> OnClickCard(string pileName, bool isCommonPile, int cardIdx, string user) { // Game.PileKind pileKind = new Game.PileKind() { Owned = (uint)GetUserIndex(user) }; @@ -365,13 +411,13 @@ public class Client : MonoBehaviour { conn.SendMessage(new Protocol.ClientServerPacket() { QueryGames = new Empty() }); } - static T runSync(Task task) { + static T runSync(Task task) { task.Wait(); return task.Result; } public void Close() { - conn.SendMessage(new Protocol.ClientServerPacket() {Disconnect = new Empty()}); + conn.SendMessage(new Protocol.ClientServerPacket() { Disconnect = new Empty() }); conn.Close(); } } diff --git a/unity/Assets/Scripts/Images.cs b/unity/Assets/Scripts/Images.cs new file mode 100644 index 0000000..b4d4945 --- /dev/null +++ b/unity/Assets/Scripts/Images.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Text; + +public class Images { + private List images = new List(); + private Dictionary refs = new Dictionary(); + + public Images(Stream s) { + ExtractTar(Decompress(s)); + } + + private DeflateStream Decompress(Stream s) { + return new DeflateStream(s, CompressionMode.Decompress); + } + + private void ExtractTar(Stream stream) { + var buffer = new byte[100]; + while (true) { + stream.Read(buffer, 0, 100); + var name = Encoding.ASCII.GetString(buffer).Trim('\0'); + if (String.IsNullOrWhiteSpace(name)) + break; + stream.Seek(24, SeekOrigin.Current); + stream.Read(buffer, 0, 12); + var size = Convert.ToInt64(Encoding.ASCII.GetString(buffer, 0, 12).Trim(), 8); + + stream.Seek(376L, SeekOrigin.Current); + + var buf = new byte[size]; + stream.Read(buf, 0, buf.Length); + if (name.EndsWith(".ref.txt")) { + string r = Encoding.UTF8.GetString(buf).Trim('\0'); + refs.Add(name.Replace(".ref.txt", ".png"), refs[r]); + }else{ + int i = images.Count; + images.Add(buf); + refs.Add(name, i); + } + + var pos = stream.Position; + + var offset = 512 - (pos % 512); + if (offset == 512) + offset = 0; + + stream.Seek(offset, SeekOrigin.Current); + } + } + + public byte[] GetImage(string name) { + return images[refs[name]]; + } + +} \ No newline at end of file diff --git a/unity/Assets/Scripts/Images.cs.meta b/unity/Assets/Scripts/Images.cs.meta new file mode 100644 index 0000000..1910839 --- /dev/null +++ b/unity/Assets/Scripts/Images.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 061da33921355adfc826eaeec65052fc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/Assets/Scripts/grpc/Game.cs b/unity/Assets/Scripts/grpc/Game.cs index 5803ab6..62d4a77 100644 --- a/unity/Assets/Scripts/grpc/Game.cs +++ b/unity/Assets/Scripts/grpc/Game.cs @@ -25,32 +25,42 @@ namespace Game { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CgpnYW1lLnByb3RvEgRnYW1lGhtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJv", - "dG8aDGNvbW1vbi5wcm90byIYCghDYXJkS2luZBIMCgRraW5kGAEgASgJIjEK", - "BUltYWdlEgwKBGZhY2UYASABKAwSDAoEYmFjaxgCIAEoDBIMCgRraW5kGAMg", - "ASgJInQKCUNhcmRJbmRleBIPCgVpbmRleBgBIAEoDUgAEiUKA3RvcBgCIAEo", - "CzIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAEigKBmJvdHRvbRgDIAEoCzIW", - "Lmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAQgUKA3BvcyJNCghQaWxlS2luZBIP", - "CgVvd25lZBgBIAEoDUgAEigKBmNvbW1vbhgCIAEoCzIWLmdvb2dsZS5wcm90", - "b2J1Zi5FbXB0eUgAQgYKBGtpbmQiYAoGQ2FyZElkEiAKCHBpbGVLaW5kGAEg", - "ASgLMg4uZ2FtZS5QaWxlS2luZBIQCghwaWxlTmFtZRgCIAEoCRIiCgljYXJk", - "SW5kZXgYAyABKAsyDy5nYW1lLkNhcmRJbmRleCKyBAoKR2FtZVN0YXR1cxIr", - "Cgtjb21tb25QaWxlcxgBIAEoCzIWLmdhbWUuR2FtZVN0YXR1cy5QaWxlcxIr", - "CgtwbGF5ZXJQaWxlcxgCIAMoCzIWLmdhbWUuR2FtZVN0YXR1cy5QaWxlcxIb", - "CgVuYW1lcxgDIAMoCzIMLmNvbW1vbi5OYW1lEhMKC2N1cnJlbnRUdXJuGAQg", - "ASgNEhMKC2hhc0ZpbmlzaGVkGAUgASgIEjAKBGluZm8YBiABKAsyIi5nYW1l", - "LkdhbWVTdGF0dXMuQ3VzdG9tSW5mb01lc3NhZ2UaQwoEQ2FyZBIcCgRraW5k", - "GAEgASgLMg4uZ2FtZS5DYXJkS2luZBIPCgd2aXNpYmxlGAIgASgIEgwKBHV1", - "aWQYAyABKAkaXQoEUGlsZRIkCgVjYXJkcxgBIAMoCzIVLmdhbWUuR2FtZVN0", - "YXR1cy5DYXJkEhAKCGZhY2VEb3duGAIgASgIEg8KB3Zpc2libGUYAyABKAgS", - "DAoEbmFtZRgEIAEoCRp+CgVQaWxlcxIwCgVwaWxlcxgBIAMoCzIhLmdhbWUu", - "R2FtZVN0YXR1cy5QaWxlcy5QaWxlc0VudHJ5GkMKClBpbGVzRW50cnkSCwoD", - "a2V5GAEgASgJEiQKBXZhbHVlGAIgASgLMhUuZ2FtZS5HYW1lU3RhdHVzLlBp", - "bGU6AjgBGi0KEUN1c3RvbUluZm9NZXNzYWdlEg0KBXRpdGxlGAEgASgJEgkK", - "AW0YAiABKAliBnByb3RvMw==")); + "dG8aH2dvb2dsZS9wcm90b2J1Zi90aW1lc3RhbXAucHJvdG8aDGNvbW1vbi5w", + "cm90byIYCghDYXJkS2luZBIMCgRraW5kGAEgASgJImgKBUNhcmRzEh8KBWNh", + "cmRzGAEgAygLMhAuZ2FtZS5DYXJkcy5DYXJkGj4KBENhcmQSDAoEa2luZBgB", + "IAEoCRIoCgR0aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFt", + "cCKlAQoGSW1hZ2VzEiMKBXNldHVwGAEgASgLMhIuZ2FtZS5JbWFnZXMuU2V0", + "VXBIABItCgpkYXRhUGFja2V0GAIgASgLMhcuZ2FtZS5JbWFnZXMuRGF0YVBh", + "Y2tldEgAGhcKBVNldFVwEg4KBm51bWJlchgBIAEoDRomCgpEYXRhUGFja2V0", + "EgoKAmlkGAEgASgNEgwKBGRhdGEYAiABKAxCBgoEZGF0YSIxCgVJbWFnZRIM", + "CgRmYWNlGAEgASgMEgwKBGJhY2sYAiABKAwSDAoEa2luZBgDIAEoCSJ0CglD", + "YXJkSW5kZXgSDwoFaW5kZXgYASABKA1IABIlCgN0b3AYAiABKAsyFi5nb29n", + "bGUucHJvdG9idWYuRW1wdHlIABIoCgZib3R0b20YAyABKAsyFi5nb29nbGUu", + "cHJvdG9idWYuRW1wdHlIAEIFCgNwb3MiTQoIUGlsZUtpbmQSDwoFb3duZWQY", + "ASABKA1IABIoCgZjb21tb24YAiABKAsyFi5nb29nbGUucHJvdG9idWYuRW1w", + "dHlIAEIGCgRraW5kImAKBkNhcmRJZBIgCghwaWxlS2luZBgBIAEoCzIOLmdh", + "bWUuUGlsZUtpbmQSEAoIcGlsZU5hbWUYAiABKAkSIgoJY2FyZEluZGV4GAMg", + "ASgLMg8uZ2FtZS5DYXJkSW5kZXgisgQKCkdhbWVTdGF0dXMSKwoLY29tbW9u", + "UGlsZXMYASABKAsyFi5nYW1lLkdhbWVTdGF0dXMuUGlsZXMSKwoLcGxheWVy", + "UGlsZXMYAiADKAsyFi5nYW1lLkdhbWVTdGF0dXMuUGlsZXMSGwoFbmFtZXMY", + "AyADKAsyDC5jb21tb24uTmFtZRITCgtjdXJyZW50VHVybhgEIAEoDRITCgto", + "YXNGaW5pc2hlZBgFIAEoCBIwCgRpbmZvGAYgASgLMiIuZ2FtZS5HYW1lU3Rh", + "dHVzLkN1c3RvbUluZm9NZXNzYWdlGkMKBENhcmQSHAoEa2luZBgBIAEoCzIO", + "LmdhbWUuQ2FyZEtpbmQSDwoHdmlzaWJsZRgCIAEoCBIMCgR1dWlkGAMgASgJ", + "Gl0KBFBpbGUSJAoFY2FyZHMYASADKAsyFS5nYW1lLkdhbWVTdGF0dXMuQ2Fy", + "ZBIQCghmYWNlRG93bhgCIAEoCBIPCgd2aXNpYmxlGAMgASgIEgwKBG5hbWUY", + "BCABKAkafgoFUGlsZXMSMAoFcGlsZXMYASADKAsyIS5nYW1lLkdhbWVTdGF0", + "dXMuUGlsZXMuUGlsZXNFbnRyeRpDCgpQaWxlc0VudHJ5EgsKA2tleRgBIAEo", + "CRIkCgV2YWx1ZRgCIAEoCzIVLmdhbWUuR2FtZVN0YXR1cy5QaWxlOgI4ARot", + "ChFDdXN0b21JbmZvTWVzc2FnZRINCgV0aXRsZRgBIAEoCRIJCgFtGAIgASgJ", + "YgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Common.CommonReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Common.CommonReflection.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.Cards), global::Game.Cards.Parser, new[]{ "Cards_" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Game.Cards.Types.Card), global::Game.Cards.Types.Card.Parser, new[]{ "Kind", "Time" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Game.Images), global::Game.Images.Parser, new[]{ "Setup", "DataPacket" }, new[]{ "Data" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Game.Images.Types.SetUp), global::Game.Images.Types.SetUp.Parser, new[]{ "Number" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Game.Images.Types.DataPacket), global::Game.Images.Types.DataPacket.Parser, new[]{ "Id", "Data" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Game.Image), global::Game.Image.Parser, new[]{ "Face", "Back", "Kind" }, 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), @@ -237,6 +247,1043 @@ namespace Game { } + public sealed partial class Cards : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Cards()); + 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[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Cards() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Cards(Cards other) : this() { + cards_ = other.cards_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Cards Clone() { + return new Cards(this); + } + + /// Field number for the "cards" field. + public const int Cards_FieldNumber = 1; + private static readonly pb::FieldCodec _repeated_cards_codec + = pb::FieldCodec.ForMessage(10, global::Game.Cards.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 Cards); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Cards 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(Cards 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 + + #region Nested types + /// Container for nested types declared in the Cards 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.Cards.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_; + time_ = other.time_ != null ? other.time_.Clone() : null; + _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 string kind_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Kind { + get { return kind_; } + set { + kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "time" field. + public const int TimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp time_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Google.Protobuf.WellKnownTypes.Timestamp Time { + get { return time_; } + set { + time_ = 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 (Kind != other.Kind) return false; + if (!object.Equals(Time, other.Time)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Kind.Length != 0) hash ^= Kind.GetHashCode(); + if (time_ != null) hash ^= Time.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.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Kind); + } + if (time_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Time); + } + 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.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Kind); + } + if (time_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Time); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Kind.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Kind); + } + if (time_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Time); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Card other) { + if (other == null) { + return; + } + if (other.Kind.Length != 0) { + Kind = other.Kind; + } + if (other.time_ != null) { + if (time_ == null) { + Time = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + Time.MergeFrom(other.Time); + } + _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: { + Kind = input.ReadString(); + break; + } + case 18: { + if (time_ == null) { + Time = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(Time); + 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: { + Kind = input.ReadString(); + break; + } + case 18: { + if (time_ == null) { + Time = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(Time); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + public sealed partial class Images : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Images()); + 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[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Images() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Images(Images other) : this() { + switch (other.DataCase) { + case DataOneofCase.Setup: + Setup = other.Setup.Clone(); + break; + case DataOneofCase.DataPacket: + DataPacket = other.DataPacket.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Images Clone() { + return new Images(this); + } + + /// Field number for the "setup" field. + public const int SetupFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.Images.Types.SetUp Setup { + get { return dataCase_ == DataOneofCase.Setup ? (global::Game.Images.Types.SetUp) data_ : null; } + set { + data_ = value; + dataCase_ = value == null ? DataOneofCase.None : DataOneofCase.Setup; + } + } + + /// Field number for the "dataPacket" field. + public const int DataPacketFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.Images.Types.DataPacket DataPacket { + get { return dataCase_ == DataOneofCase.DataPacket ? (global::Game.Images.Types.DataPacket) data_ : null; } + set { + data_ = value; + dataCase_ = value == null ? DataOneofCase.None : DataOneofCase.DataPacket; + } + } + + private object data_; + /// Enum of possible cases for the "data" oneof. + public enum DataOneofCase { + None = 0, + Setup = 1, + DataPacket = 2, + } + private DataOneofCase dataCase_ = DataOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DataOneofCase DataCase { + get { return dataCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearData() { + dataCase_ = DataOneofCase.None; + data_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Images); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Images other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Setup, other.Setup)) return false; + if (!object.Equals(DataPacket, other.DataPacket)) return false; + if (DataCase != other.DataCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (dataCase_ == DataOneofCase.Setup) hash ^= Setup.GetHashCode(); + if (dataCase_ == DataOneofCase.DataPacket) hash ^= DataPacket.GetHashCode(); + hash ^= (int) dataCase_; + 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 (dataCase_ == DataOneofCase.Setup) { + output.WriteRawTag(10); + output.WriteMessage(Setup); + } + if (dataCase_ == DataOneofCase.DataPacket) { + output.WriteRawTag(18); + output.WriteMessage(DataPacket); + } + 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 (dataCase_ == DataOneofCase.Setup) { + output.WriteRawTag(10); + output.WriteMessage(Setup); + } + if (dataCase_ == DataOneofCase.DataPacket) { + output.WriteRawTag(18); + output.WriteMessage(DataPacket); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (dataCase_ == DataOneofCase.Setup) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); + } + if (dataCase_ == DataOneofCase.DataPacket) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(DataPacket); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Images other) { + if (other == null) { + return; + } + switch (other.DataCase) { + case DataOneofCase.Setup: + if (Setup == null) { + Setup = new global::Game.Images.Types.SetUp(); + } + Setup.MergeFrom(other.Setup); + break; + case DataOneofCase.DataPacket: + if (DataPacket == null) { + DataPacket = new global::Game.Images.Types.DataPacket(); + } + DataPacket.MergeFrom(other.DataPacket); + 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 10: { + global::Game.Images.Types.SetUp subBuilder = new global::Game.Images.Types.SetUp(); + if (dataCase_ == DataOneofCase.Setup) { + subBuilder.MergeFrom(Setup); + } + input.ReadMessage(subBuilder); + Setup = subBuilder; + break; + } + case 18: { + global::Game.Images.Types.DataPacket subBuilder = new global::Game.Images.Types.DataPacket(); + if (dataCase_ == DataOneofCase.DataPacket) { + subBuilder.MergeFrom(DataPacket); + } + input.ReadMessage(subBuilder); + DataPacket = 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 10: { + global::Game.Images.Types.SetUp subBuilder = new global::Game.Images.Types.SetUp(); + if (dataCase_ == DataOneofCase.Setup) { + subBuilder.MergeFrom(Setup); + } + input.ReadMessage(subBuilder); + Setup = subBuilder; + break; + } + case 18: { + global::Game.Images.Types.DataPacket subBuilder = new global::Game.Images.Types.DataPacket(); + if (dataCase_ == DataOneofCase.DataPacket) { + subBuilder.MergeFrom(DataPacket); + } + input.ReadMessage(subBuilder); + DataPacket = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Images message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class SetUp : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetUp()); + 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.Images.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetUp() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetUp(SetUp other) : this() { + number_ = other.number_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetUp Clone() { + return new SetUp(this); + } + + /// Field number for the "number" field. + public const int NumberFieldNumber = 1; + private uint number_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Number { + get { return number_; } + set { + number_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SetUp); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SetUp other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Number != other.Number) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Number != 0) hash ^= Number.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 (Number != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Number); + } + 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 (Number != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Number); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Number != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Number); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SetUp other) { + if (other == null) { + return; + } + if (other.Number != 0) { + Number = other.Number; + } + _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: { + Number = 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 8: { + Number = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + public sealed partial class DataPacket : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DataPacket()); + 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.Images.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DataPacket() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DataPacket(DataPacket other) : this() { + id_ = other.id_; + data_ = other.data_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DataPacket Clone() { + return new DataPacket(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private uint id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 2; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DataPacket); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DataPacket other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Data != other.Data) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (Data.Length != 0) hash ^= Data.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 (Id != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Id); + } + if (Data.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Data); + } + 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 (Id != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Id); + } + if (Data.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DataPacket other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + _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: { + Id = input.ReadUInt32(); + break; + } + case 18: { + Data = 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 8: { + Id = input.ReadUInt32(); + break; + } + case 18: { + Data = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + public sealed partial class Image : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -249,7 +1296,7 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Game.GameReflection.Descriptor.MessageTypes[1]; } + get { return global::Game.GameReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -493,7 +1540,7 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Game.GameReflection.Descriptor.MessageTypes[2]; } + get { return global::Game.GameReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -797,7 +1844,7 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Game.GameReflection.Descriptor.MessageTypes[3]; } + get { return global::Game.GameReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1049,7 +2096,7 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Game.GameReflection.Descriptor.MessageTypes[4]; } + get { return global::Game.GameReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1311,7 +2358,7 @@ namespace Game { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Game.GameReflection.Descriptor.MessageTypes[5]; } + get { return global::Game.GameReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/unity/Assets/Scripts/grpc/Protocol.cs b/unity/Assets/Scripts/grpc/Protocol.cs index b79dde5..0d13838 100644 --- a/unity/Assets/Scripts/grpc/Protocol.cs +++ b/unity/Assets/Scripts/grpc/Protocol.cs @@ -26,7 +26,7 @@ namespace Protocol { string.Concat( "Cg5wcm90b2NvbC5wcm90bxIIcHJvdG9jb2waG2dvb2dsZS9wcm90b2J1Zi9l", "bXB0eS5wcm90bxoMY29tbW9uLnByb3RvGhBjb25uZWN0aW9uLnByb3RvGgts", - "b2JieS5wcm90bxoKZ2FtZS5wcm90byL9BAoSQ2xpZW50U2VydmVyUGFja2V0", + "b2JieS5wcm90bxoKZ2FtZS5wcm90byKlBQoSQ2xpZW50U2VydmVyUGFja2V0", "EisKCXF1ZXJ5TmFtZRgBIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgA", "Eh8KB2Nvbm5lY3QYAiABKAsyDC5jb21tb24uTmFtZUgAEiwKCmRpc2Nvbm5l", "Y3QYAyABKAsyFi5nb29nbGUucHJvdG9idWYuRW1wdHlIABIqCglqb2luTG9i", @@ -40,25 +40,27 @@ namespace Protocol { "ASgLMhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5SAASKAoOcXVlcnlDYXJkSW1h", "Z2UYDCABKAsyDi5nYW1lLkNhcmRLaW5kSAASIwoLY2FsbE9uQ2xpY2sYDSAB", "KAsyDC5nYW1lLkNhcmRJZEgAEjEKD3F1ZXJ5R2FtZVN0YXR1cxgOIAEoCzIW", - "Lmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAQgYKBGRhdGEioQMKElNlcnZlckNs", - "aWVudFBhY2tldBIiCgpyZXR1cm5OYW1lGAEgASgLMgwuY29tbW9uLk5hbWVI", - "ABIrCg1yZXR1cm5Db25uZWN0GAIgASgLMhIuY29ubmVjdGlvbi5Vc2VySURI", - "ABIyChFyZXR1cm5DcmVhdGVMb2JieRgDIAEoCzIVLmNvbm5lY3Rpb24uTG9i", - "YnlDb2RlSAASJgoLcmV0dXJuR2FtZXMYBCABKAsyDy5wcm90b2NvbC5HYW1l", - "c0gAEjMKE3JldHVyblB1YmxpY0xvYmJpZXMYBSABKAsyFC5wcm90b2NvbC5M", - "b2JieUNvZGVzSAASJgoLcmV0dXJuVXNlcnMYBiABKAsyDy5wcm90b2NvbC5O", - "YW1lc0gAEikKC2xvYmJ5U3RhdHVzGAcgASgLMhIubG9iYnkuTG9iYnlTdGF0", - "dXNIABImCg9yZXR1cm5DYXJkSW1hZ2UYCCABKAsyCy5nYW1lLkltYWdlSAAS", - "JgoKZ2FtZVN0YXR1cxgJIAEoCzIQLmdhbWUuR2FtZVN0YXR1c0gAQgYKBGRh", - "dGEiKAoFR2FtZXMSHwoFZ2FtZXMYASADKAsyEC5jb25uZWN0aW9uLkdhbWUi", - "NwoKTG9iYnlDb2RlcxIpCgpsb2JieUNvZGVzGAEgAygLMhUuY29ubmVjdGlv", - "bi5Mb2JieUNvZGUiJAoFTmFtZXMSGwoFbmFtZXMYASADKAsyDC5jb21tb24u", - "TmFtZWIGcHJvdG8z")); + "Lmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAEiYKD3F1ZXJ5Q2FyZEltYWdlcxgP", + "IAEoCzILLmdhbWUuQ2FyZHNIAEIGCgRkYXRhIswDChJTZXJ2ZXJDbGllbnRQ", + "YWNrZXQSIgoKcmV0dXJuTmFtZRgBIAEoCzIMLmNvbW1vbi5OYW1lSAASKwoN", + "cmV0dXJuQ29ubmVjdBgCIAEoCzISLmNvbm5lY3Rpb24uVXNlcklESAASMgoR", + "cmV0dXJuQ3JlYXRlTG9iYnkYAyABKAsyFS5jb25uZWN0aW9uLkxvYmJ5Q29k", + "ZUgAEiYKC3JldHVybkdhbWVzGAQgASgLMg8ucHJvdG9jb2wuR2FtZXNIABIz", + "ChNyZXR1cm5QdWJsaWNMb2JiaWVzGAUgASgLMhQucHJvdG9jb2wuTG9iYnlD", + "b2Rlc0gAEiYKC3JldHVyblVzZXJzGAYgASgLMg8ucHJvdG9jb2wuTmFtZXNI", + "ABIpCgtsb2JieVN0YXR1cxgHIAEoCzISLmxvYmJ5LkxvYmJ5U3RhdHVzSAAS", + "JgoPcmV0dXJuQ2FyZEltYWdlGAggASgLMgsuZ2FtZS5JbWFnZUgAEikKEXJl", + "dHVybkNhcmRzSW1hZ2VzGAogASgLMgwuZ2FtZS5JbWFnZXNIABImCgpnYW1l", + "U3RhdHVzGAkgASgLMhAuZ2FtZS5HYW1lU3RhdHVzSABCBgoEZGF0YSIoCgVH", + "YW1lcxIfCgVnYW1lcxgBIAMoCzIQLmNvbm5lY3Rpb24uR2FtZSI3CgpMb2Ji", + "eUNvZGVzEikKCmxvYmJ5Q29kZXMYASADKAsyFS5jb25uZWN0aW9uLkxvYmJ5", + "Q29kZSIkCgVOYW1lcxIbCgVuYW1lcxgBIAMoCzIMLmNvbW1vbi5OYW1lYgZw", + "cm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Common.CommonReflection.Descriptor, global::Connection.ConnectionReflection.Descriptor, global::Lobby.LobbyReflection.Descriptor, global::Game.GameReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.ClientServerPacket), global::Protocol.ClientServerPacket.Parser, new[]{ "QueryName", "Connect", "Disconnect", "JoinLobby", "CreateLobby", "QueryGames", "QueryPublicLobbies", "QueryUsers", "Vote", "Ready", "Leave", "QueryCardImage", "CallOnClick", "QueryGameStatus" }, new[]{ "Data" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.ServerClientPacket), global::Protocol.ServerClientPacket.Parser, new[]{ "ReturnName", "ReturnConnect", "ReturnCreateLobby", "ReturnGames", "ReturnPublicLobbies", "ReturnUsers", "LobbyStatus", "ReturnCardImage", "GameStatus" }, new[]{ "Data" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.ClientServerPacket), global::Protocol.ClientServerPacket.Parser, new[]{ "QueryName", "Connect", "Disconnect", "JoinLobby", "CreateLobby", "QueryGames", "QueryPublicLobbies", "QueryUsers", "Vote", "Ready", "Leave", "QueryCardImage", "CallOnClick", "QueryGameStatus", "QueryCardImages" }, new[]{ "Data" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.ServerClientPacket), global::Protocol.ServerClientPacket.Parser, new[]{ "ReturnName", "ReturnConnect", "ReturnCreateLobby", "ReturnGames", "ReturnPublicLobbies", "ReturnUsers", "LobbyStatus", "ReturnCardImage", "ReturnCardsImages", "GameStatus" }, new[]{ "Data" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.Games), global::Protocol.Games.Parser, new[]{ "Games_" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.LobbyCodes), global::Protocol.LobbyCodes.Parser, new[]{ "LobbyCodes_" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Protocol.Names), global::Protocol.Names.Parser, new[]{ "Names_" }, null, null, null, null) @@ -140,6 +142,9 @@ namespace Protocol { case DataOneofCase.QueryGameStatus: QueryGameStatus = other.QueryGameStatus.Clone(); break; + case DataOneofCase.QueryCardImages: + QueryCardImages = other.QueryCardImages.Clone(); + break; } _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -313,6 +318,17 @@ namespace Protocol { } } + /// Field number for the "queryCardImages" field. + public const int QueryCardImagesFieldNumber = 15; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.Cards QueryCardImages { + get { return dataCase_ == DataOneofCase.QueryCardImages ? (global::Game.Cards) data_ : null; } + set { + data_ = value; + dataCase_ = value == null ? DataOneofCase.None : DataOneofCase.QueryCardImages; + } + } + private object data_; /// Enum of possible cases for the "data" oneof. public enum DataOneofCase { @@ -331,6 +347,7 @@ namespace Protocol { QueryCardImage = 12, CallOnClick = 13, QueryGameStatus = 14, + QueryCardImages = 15, } private DataOneofCase dataCase_ = DataOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -371,6 +388,7 @@ namespace Protocol { if (!object.Equals(QueryCardImage, other.QueryCardImage)) return false; if (!object.Equals(CallOnClick, other.CallOnClick)) return false; if (!object.Equals(QueryGameStatus, other.QueryGameStatus)) return false; + if (!object.Equals(QueryCardImages, other.QueryCardImages)) return false; if (DataCase != other.DataCase) return false; return Equals(_unknownFields, other._unknownFields); } @@ -392,6 +410,7 @@ namespace Protocol { if (dataCase_ == DataOneofCase.QueryCardImage) hash ^= QueryCardImage.GetHashCode(); if (dataCase_ == DataOneofCase.CallOnClick) hash ^= CallOnClick.GetHashCode(); if (dataCase_ == DataOneofCase.QueryGameStatus) hash ^= QueryGameStatus.GetHashCode(); + if (dataCase_ == DataOneofCase.QueryCardImages) hash ^= QueryCardImages.GetHashCode(); hash ^= (int) dataCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -465,6 +484,10 @@ namespace Protocol { output.WriteRawTag(114); output.WriteMessage(QueryGameStatus); } + if (dataCase_ == DataOneofCase.QueryCardImages) { + output.WriteRawTag(122); + output.WriteMessage(QueryCardImages); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -530,6 +553,10 @@ namespace Protocol { output.WriteRawTag(114); output.WriteMessage(QueryGameStatus); } + if (dataCase_ == DataOneofCase.QueryCardImages) { + output.WriteRawTag(122); + output.WriteMessage(QueryCardImages); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -581,6 +608,9 @@ namespace Protocol { if (dataCase_ == DataOneofCase.QueryGameStatus) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryGameStatus); } + if (dataCase_ == DataOneofCase.QueryCardImages) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryCardImages); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -677,6 +707,12 @@ namespace Protocol { } QueryGameStatus.MergeFrom(other.QueryGameStatus); break; + case DataOneofCase.QueryCardImages: + if (QueryCardImages == null) { + QueryCardImages = new global::Game.Cards(); + } + QueryCardImages.MergeFrom(other.QueryCardImages); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -819,6 +855,15 @@ namespace Protocol { QueryGameStatus = subBuilder; break; } + case 122: { + global::Game.Cards subBuilder = new global::Game.Cards(); + if (dataCase_ == DataOneofCase.QueryCardImages) { + subBuilder.MergeFrom(QueryCardImages); + } + input.ReadMessage(subBuilder); + QueryCardImages = subBuilder; + break; + } } } #endif @@ -959,6 +1004,15 @@ namespace Protocol { QueryGameStatus = subBuilder; break; } + case 122: { + global::Game.Cards subBuilder = new global::Game.Cards(); + if (dataCase_ == DataOneofCase.QueryCardImages) { + subBuilder.MergeFrom(QueryCardImages); + } + input.ReadMessage(subBuilder); + QueryCardImages = subBuilder; + break; + } } } } @@ -1020,6 +1074,9 @@ namespace Protocol { case DataOneofCase.ReturnCardImage: ReturnCardImage = other.ReturnCardImage.Clone(); break; + case DataOneofCase.ReturnCardsImages: + ReturnCardsImages = other.ReturnCardsImages.Clone(); + break; case DataOneofCase.GameStatus: GameStatus = other.GameStatus.Clone(); break; @@ -1130,6 +1187,17 @@ namespace Protocol { } } + /// Field number for the "returnCardsImages" field. + public const int ReturnCardsImagesFieldNumber = 10; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Game.Images ReturnCardsImages { + get { return dataCase_ == DataOneofCase.ReturnCardsImages ? (global::Game.Images) data_ : null; } + set { + data_ = value; + dataCase_ = value == null ? DataOneofCase.None : DataOneofCase.ReturnCardsImages; + } + } + /// Field number for the "gameStatus" field. public const int GameStatusFieldNumber = 9; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1153,6 +1221,7 @@ namespace Protocol { ReturnUsers = 6, LobbyStatus = 7, ReturnCardImage = 8, + ReturnCardsImages = 10, GameStatus = 9, } private DataOneofCase dataCase_ = DataOneofCase.None; @@ -1188,6 +1257,7 @@ namespace Protocol { if (!object.Equals(ReturnUsers, other.ReturnUsers)) return false; if (!object.Equals(LobbyStatus, other.LobbyStatus)) return false; if (!object.Equals(ReturnCardImage, other.ReturnCardImage)) return false; + if (!object.Equals(ReturnCardsImages, other.ReturnCardsImages)) return false; if (!object.Equals(GameStatus, other.GameStatus)) return false; if (DataCase != other.DataCase) return false; return Equals(_unknownFields, other._unknownFields); @@ -1204,6 +1274,7 @@ namespace Protocol { if (dataCase_ == DataOneofCase.ReturnUsers) hash ^= ReturnUsers.GetHashCode(); if (dataCase_ == DataOneofCase.LobbyStatus) hash ^= LobbyStatus.GetHashCode(); if (dataCase_ == DataOneofCase.ReturnCardImage) hash ^= ReturnCardImage.GetHashCode(); + if (dataCase_ == DataOneofCase.ReturnCardsImages) hash ^= ReturnCardsImages.GetHashCode(); if (dataCase_ == DataOneofCase.GameStatus) hash ^= GameStatus.GetHashCode(); hash ^= (int) dataCase_; if (_unknownFields != null) { @@ -1258,6 +1329,10 @@ namespace Protocol { output.WriteRawTag(74); output.WriteMessage(GameStatus); } + if (dataCase_ == DataOneofCase.ReturnCardsImages) { + output.WriteRawTag(82); + output.WriteMessage(ReturnCardsImages); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1303,6 +1378,10 @@ namespace Protocol { output.WriteRawTag(74); output.WriteMessage(GameStatus); } + if (dataCase_ == DataOneofCase.ReturnCardsImages) { + output.WriteRawTag(82); + output.WriteMessage(ReturnCardsImages); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1336,6 +1415,9 @@ namespace Protocol { if (dataCase_ == DataOneofCase.ReturnCardImage) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReturnCardImage); } + if (dataCase_ == DataOneofCase.ReturnCardsImages) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReturnCardsImages); + } if (dataCase_ == DataOneofCase.GameStatus) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(GameStatus); } @@ -1399,6 +1481,12 @@ namespace Protocol { } ReturnCardImage.MergeFrom(other.ReturnCardImage); break; + case DataOneofCase.ReturnCardsImages: + if (ReturnCardsImages == null) { + ReturnCardsImages = new global::Game.Images(); + } + ReturnCardsImages.MergeFrom(other.ReturnCardsImages); + break; case DataOneofCase.GameStatus: if (GameStatus == null) { GameStatus = new global::Game.GameStatus(); @@ -1502,6 +1590,15 @@ namespace Protocol { GameStatus = subBuilder; break; } + case 82: { + global::Game.Images subBuilder = new global::Game.Images(); + if (dataCase_ == DataOneofCase.ReturnCardsImages) { + subBuilder.MergeFrom(ReturnCardsImages); + } + input.ReadMessage(subBuilder); + ReturnCardsImages = subBuilder; + break; + } } } #endif @@ -1597,6 +1694,15 @@ namespace Protocol { GameStatus = subBuilder; break; } + case 82: { + global::Game.Images subBuilder = new global::Game.Images(); + if (dataCase_ == DataOneofCase.ReturnCardsImages) { + subBuilder.MergeFrom(ReturnCardsImages); + } + input.ReadMessage(subBuilder); + ReturnCardsImages = subBuilder; + break; + } } } }