示例#1
0
        public bool TurnSwitches()
        {
            int   el;
            Track trk;

            // turn every switch
            for (el = 0; el < nsects; ++el)
            {
                trk = Globals.findSwitch(sw[el].x, sw[el].y);
                if (trk == null)
                {
                    return(false);
                }
                sw[el].oldsw = trk.switched;
                trk.switched = sw[el].switched;
            }
            return(true);
        }