Ejemplo n.º 1
0
        /// <summary>
        /// creates a new slot machine
        /// </summary>
        /// <param name="Settings">The Settings to use for the slot machine</param>
        /// <param name="State">The InternalState to use for the slot machine</param>
        public SlotMachine(SlotMachineSettings Settings, SlotMachineState State)
        {
            if (Settings == null)
            {
                Settings = new SlotMachineSettings();

                if (Console.CursorLeft != 0)
                {
                    Console.WriteLine();
                    Settings.Left = Console.CursorLeft;
                    Settings.Top = Console.CursorTop;
                }
            }

            if (State == null)
            {
                State = new SlotMachineState(Settings);
            }

            this.State = State;
            this.Settings = Settings;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new slot machine with default Settings
 /// </summary>
 /// <param name="State">The InternalState to use for the slot machine</param>
 public SlotMachine(SlotMachineState State)
     : this(null, State)
 {
 }