package controller;

import boundary.PlayerApplication;
import model.PlayerModel;
import model.PlayerState;
import model.Point;

public class PlayerFinishMoveCtrl {
  PlayerApplication app;
  PlayerModel model;

  public PlayerFinishMoveCtrl(PlayerApplication app, PlayerModel model) {
    this.app = app;
    this.model = model;
  }

  /**
   * TODO: are there anything in the boundary that needs to get updated?
   */
  public void finishMove(Point point) {
    model.playerState = PlayerState.NONE;
    model.move.expand(model.level.currentBoard, point);
    if (model.variation.finishMove()) {
      // TODO: finish the move!
    }
  }
}

@@ -559,27 +559,87 @@
     
-if (model.variation
+PlayerVariationCtrl pVar = model.variation.createCtrl(app, model);%0A    if (pVar
 .fin

Modify PlayerFinishMoveCtrl to address a change in the model (PlayerModel.variation)