Ejemplo n.º 1
0
        public void encode(CEncodedObjectOutputBufferI output)
        {
            output.openObject(TAG);
            output.addAttr(GAME_MAP_WIDTH_ATTR, Convert.ToString(mapUtil_.width_));
            output.addAttr(GAME_MAP_HWRAP_ATTR, EncodeUtil.makeBoolString(mapUtil_.hwrap_));
            output.addAttr(GAME_MAP_HEIGHT_ATTR, Convert.ToString(mapUtil_.height_));
            output.addAttr(GAME_MAP_VWRAP_ATTR, EncodeUtil.makeBoolString(mapUtil_.vwrap_));
            output.addAttr(STACKCOUNT, Convert.ToString(stackCount_));

            output.addTextObject(TMAP_TAG, new string(mapBytes_));

            EncodeUtil.encodeStringList(WASTELAND, new List <string>(wasteland_.Keys), output);
            EncodeUtil.encodeStringList(MINES, new List <string>(mines_.Keys), output);
            EncodeUtil.encodeStringList(ROAD, new List <string>(roads_.Keys), output);
            EncodeUtil.encodeDSI(RESOURCES, resources_, output);

            output.objectEnd();
        }