Example #1
0
 private QuatroField(QuatroField original)
 {
     this.field = (int[,])original.field.Clone();
     this.heads = (int[])original.heads.Clone();
     this.plays = new List<int>(original.plays);
     this.State = original.State;
     this.PlayerWon = original.PlayerWon;
 }
Example #2
0
        public QuatroGame(QuatroPlayer player1, QuatroPlayer player2, QuatroOptions options)
        {
            this.options = options;
            turnTime = (int)(options.turnSeconds * 100);

            state = QuatroGameState.Idle;

            this.player1 = player1;
            this.player2 = player2;

            //time mechanics
            dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick += UpdateTimer;
            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 10);

            field = new QuatroField();

            player1.StartGame();
            player2.StartGame();

            if (options.automaticPlay != QuatroOptions.AutomaticPlay.StepAnalysis)
                NextGameStep();
        }
Example #3
0
 public abstract int playI(QuatroField field, InterfaceNotifier notifier);
Example #4
0
 public virtual void EndGame(QuatroField field)
 {
 }
Example #5
0
 public virtual Control Analyse(QuatroField field)
 {
     Label empty = new Label();
     empty.Content = "Nothing to show";
     return empty;
 }