Beispiel #1
0
 public PlayerModel(SquareModel initialSquare, MasterOccupiedRange masterOccupiedRange)
     : base(initialSquare, masterOccupiedRange)
 {
     MoveCount = new IntReactiveProperty(-1);
 }
Beispiel #2
0
 public override void MoveTo(SquareModel square)
 {
     base.MoveTo(square);
     MoveCount.Value++;
 }
Beispiel #3
0
 protected PieceModelBase(SquareModel initialSquare, MasterOccupiedRange masterOccupiedRange)
 {
     CurrentSquare            = new ReactiveProperty <SquareModel>(initialSquare);
     this.masterOccupiedRange = masterOccupiedRange;
 }
Beispiel #4
0
 public virtual void MoveTo(SquareModel square)
 {
     CurrentSquare.Value = square;
 }
Beispiel #5
0
 private void Rotate(SquareModel delta)
 {
     CurrentRotation.Value = CurrentRotation.Value.Rotate(delta);
 }
Beispiel #6
0
 private void Move(SquareModel delta)
 {
     delta = delta.Rotate(CurrentRotation.Value);
     CurrentSquare.Value += delta;
 }
Beispiel #7
0
 public EnemyModel(MasterEnemy masterEnemy, SquareModel initialSquare, SquareModel initialRotation)
     : base(initialSquare, masterEnemy.occupiedRange)
 {
     this.masterEnemy = masterEnemy;
     CurrentRotation  = new ReactiveProperty <SquareModel>(initialRotation);
 }
Beispiel #8
0
 public bool IsGoal(SquareModel squareModel)
 {
     return(squareModel == goalSquare);
 }
Beispiel #9
0
 public BoardMedel(SquareModel boardSize, SquareModel goalSquare) : this(boardSize.X, boardSize.Y)
 {
     this.goalSquare = goalSquare;
 }