コード例 #1
0
 public static SimpleAlgorythm Instance(Player player)
 {
     if (_instance == null)
     {
         _instance = new SimpleAlgorythm(player);
     }
     return(_instance);
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 public void SetEasyLevel()
 {
     _timer.Tick -= _algo.OnTimer;
     _algo        = SimpleAlgorythm.Instance(this);
     _timer.Tick += _algo.OnTimer;
 }