public static SimpleAlgorythm Instance(Player player) { if (_instance == null) { _instance = new SimpleAlgorythm(player); } return(_instance); }
public ComputerPlayer(string name) : base(name) { _algo = SimpleAlgorythm.Instance(this); _random = new Random(DateTime.Now.Millisecond); _timer = new Timer { Enabled = false }; _timer.Tick += _algo.OnTimer; }
public void SetEasyLevel() { _timer.Tick -= _algo.OnTimer; _algo = SimpleAlgorythm.Instance(this); _timer.Tick += _algo.OnTimer; }