Exemple #1
0
        public Pitch(GameController gameController)
            : base()
        {
            base.Width = 50*GameController.PITCH_X;
            base.Height = 50;
            this.playerOne = gameController.Player1;
            this.playerTwo = gameController.Player2;

            for (var i = 0; i < FieldArray.Length; i++)
                FieldArray[i] = new Field(i);
        }
Exemple #2
0
        public void Move(Field nextTarget)
        {
            if (nextTarget == null)
                throw new NotImplementedException("Field target must not be null.");

            if (this.CurrentField == null)
                throw new NotImplementedException("CurrentField must not be null.");

            this.CurrentField.RemoveChild(this);
            this.CurrentField = this.TargetField;
            this.CurrentField.AddChildren(this);

            this.TargetField = (this.CurrentField != nextTarget) ? nextTarget : null;
        }
Exemple #3
0
 public void Checkfield(Field f)
 {
     Field field = f;
 }