Exemplo n.º 1
0
        public override string ToString()
        {
            string str = $"{{GameNr:{GameNr},GameName:{GameName},UserName:{UserName}";

            if (!IsEmpty)
            {
                str += ",gridcontent:[";
                for (int x = 0; x < 9; x++)
                {
                    for (int y = 0; y < 9; y++)
                    {
                        str += new GridContent(this[x, y]).ToString() + ",";
                    }
                }
                str  = str.Substring(0, str.Length - 2); // truncate last comma
                str += "]";
            }
            return(str + "}}");
        }