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); }
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; }
public void Checkfield(Field f) { Field field = f; }