Ejemplo n.º 1
0
        public RoomState Copy()
        {
            var rs = new RoomState(PlayerPosition, Entities.ConvertAll(e => e.Copy()));

            rs.MoveCount = MoveCount;
            return(rs);
        }
Ejemplo n.º 2
0
        public Room(int width, int height, IntVec[] switches, Teleporter[] teleporters, RoomState initialState)
        {
            Width       = width;
            Height      = height;
            field       = new FieldObject[Width, Height];
            Switches    = switches;
            Teleporters = teleporters;

            this.initialState = initialState.Copy();
            history           = new Stack <RoomState>();

            CurrentState           = initialState.Copy();
            CurrentState.MoveCount = 0;
        }