public static string GetPlayfieldTypeString(PlayfieldType type) { switch (type) { case PlayfieldType.Square: return "SQUARE"; case PlayfieldType.Hexagonal: return "HEXAGONAL"; } return string.Empty; }
public override void ParseJson(JSONNode json) { MechanicType = (MechanicType)Enum.Parse(typeof(MechanicType), json["mechanic"].ToString().Replace("\"", "")); PlayfieldType = (PlayfieldType)Enum.Parse(typeof(PlayfieldType), json["playfield"].ToString().Replace("\"", "")); }