示例#1
0
        /// <summary>
        /// Creates a new GameController object with the given machine type and logging infrastructure
        /// </summary>
        /// <param name="machineType">Machine type to use (WPC, STERN, PDB etc)</param>
        /// <param name="logger">The logger interface to use</param>
        public GameController(MachineType machineType, ILogger logger)
        {
            this.Logger       = logger;
            this._machineType = machineType;
            this._proc        = new ProcDevice(machineType, Logger);
            this._proc.reset(1);
            this._modes       = new ModeQueue(this);
            this._bootTime    = Time.GetTime();
            this._coils       = new AttrCollection <ushort, string, Driver>();
            this._switches    = new AttrCollection <ushort, string, Switch>();
            this._lamps       = new AttrCollection <ushort, string, Driver>();
            this._gi          = new AttrCollection <ushort, string, Driver>();
            this._old_players = new List <Player>();
            this._players     = new List <Player>();

            testFrame = new byte[128 * 32];
            for (int i = 0; i < (128 * 32); i++)
            {
                testFrame[i] = 0;
            }
        }
示例#2
0
        /// <summary>
        /// Creates a new GameController object with the given machine type and logging infrastructure
        /// </summary>
        /// <param name="machineType">Machine type to use (WPC, STERN, PDB etc)</param>
        /// <param name="logger">The logger interface to use</param>
        public GameController(MachineType machineType, ILogger logger)
        {
            this.Logger = logger;
            this._machineType = machineType;
            this._proc = new ProcDevice(machineType, Logger);
            this._proc.reset(1);
            this._modes = new ModeQueue(this);
            this._bootTime = Time.GetTime();
            this._coils = new AttrCollection<ushort, string, Driver>();
            this._switches = new AttrCollection<ushort, string, Switch>();
            this._lamps = new AttrCollection<ushort, string, Driver>();
            this._gi = new AttrCollection<ushort, string, Driver>();
            this._old_players = new List<Player>();
            this._players = new List<Player>();

            testFrame = new byte[128 * 32];
            for (int i = 0; i < (128 * 32); i++)
            {
                testFrame[i] = 0;
            }
        }