public SettingGame(int wh, int ht, IForm gameForm) { draw = new Paint(wh, ht); StructMap.BlockSize = 30; map = new StructMap(); form = gameForm; ship1 = ship2 = ship3 = ship4 = 0; }
public void PackStruct() { StructMap map = new StructMap() { a = 0, d = null }; byte[] data = Pack <StructMap>(map); StructMap result = Unpack <StructMap>(data); Assert.AreEqual(map.a, result.a); Assert.AreEqual(map.d, result.d); }
public void PackStruct() { object value = new StructMap() { a = 1, b = 2 }; byte[] data = Pack <object>(value); Dictionary <object, object> result = (Dictionary <object, object>)Unpack <object>(data); Assert.AreEqual(2, result.Count); Assert.AreEqual(result["a"], 1); Assert.AreEqual(result["b"], 2); }
public ActGame(GameForm gameForm, int wh, int ht, StructMap sMap) { form = gameForm; draw = new Paint(wh, ht); map = sMap; }