Example #1
0
 public virtual JsonClass GetJson()
 {
     JsonClass json = new JsonClass();
     json.AddObjects(new JsonValue("index", Index));
     json.AddObjects(new JsonValue("type", Name));
     return json;
 }
Example #2
0
        public override JsonClass GetJson()
        {
            JsonClass json = new JsonClass();

            json.AddObjects(new JsonValue("mechanic", MechanicType));
            json.AddObjects(new JsonValue("playfield", PlayfieldType));

            return json;
        }
Example #3
0
        public override JsonClass GetJson()
        {
            JsonClass json = new JsonClass();

            json.AddObjects(new JsonValue("size", Size));
            json.AddObjects(new JsonValue("shift", Shift));
            json.AddObjects(new JsonValue("direction", Direction));
            json.AddObjects(new JsonValue("pivot", Pivot));

            return json;
        }
Example #4
0
        public JsonClass GetJson()
        {
            var json = new JsonClass();
            json.AddObjects(new JsonValue("index", Index));
            json.AddObjects(new JsonValue("cell_state", CellState));

            if (CellState != CellState.Inactive)
            {
                var cellObjects = _objects.Select(obj => obj.Value.GetJson()).ToList();
                json.AddObjects(new JsonArray("cell_objects", cellObjects));
            }
            return json;
        }