Esempio n. 1
0
        internal void Deserialize(HashSet <GridCell> all_grid_cells, HashSet <Cell> all_cells, BinaryReader r)
        {
            base.Deserialize(all_grid_cells, r);

            int cells_count = r.ReadInt32();

            for (int i = 0; i < cells_count; ++i)
            {
                int cell_global_id = r.ReadInt32();
                Cells.AddFirst(all_cells.First(x => x.GlobalId == cell_global_id));
            }

            int replacement_cells_count = r.ReadInt32();

            for (int i = 0; i < replacement_cells_count; ++i)
            {
                int cell_global_id = r.ReadInt32();
                ReplacementCells.Add(all_cells.First(x => x.GlobalId == cell_global_id));
            }
        }
Esempio n. 2
0
 internal void AddReplacementCell(Cell cell)
 {
     ReplacementCells.Add(cell);
 }