Fields missing in Json serialization classes

In the JsonMap.json, missiles and buildings have a playerType field, they also have their own x/y coordinates, however these are missing in the Missile and Building classes that are used for de-serialization. This leads to not having access to missile ownership in gameState without modifying the example code.


    public class Building
        public int Health { get; set; }
        public int ConstructionTimeLeft { get; set; }
        public int Price { get; set; }
        public int WeaponDamage { get; set; }
        public int WeaponSpeed { get; set; }
        public int WeaponCooldownTimeLeft { get; set; }
        public int WeaponCooldownPeriod { get; set; }
        public int DestroyScore { get; set; }
        public int EnergyGeneratedPerTurn { get; set; }
        public BuildingType BuildingType { get; set; }

    public class Missile
        public int Damage { get; set; }
        public int Speed { get; set; }

The x/y coordinates are also redundant, because the missiles/buildings are already placed inside the corresponding x/y bucket. I also don’t see the point of dumping all the building stats for each building for every instance of that building, all the fields except the cool-downs are constants.

The playertype and coordinates should be extended from the cell class

The reason for coordinates in the object is so that participants can use different approaches in processing the data, you can find out more here: