package controller;

import boundary.PlayerApplication;
import model.Move;
import model.PlayerModel;
import model.Point;
import model.Variation;

/**
 * @author Nick Chaput
 */
public class PlayerRemoveCtrl {
  PlayerApplication app;
  PlayerModel model;

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

  public void mouseClicked(Point point) {
    // TODO: generic implementation
    PlayerVariationCtrl pVar = model.variation.createCtrl(app, model);
    if (model.variation != Variation.RELEASE &&
        model.level.currentBoard.grid[point.x][point.y].tile.number != 6) {
      // GO INTO PLAYERMODEL AND REPLACE PLAYERVARIATIONCTRL WITH VARIATION
      // TODO: This is suboptimal, decide whether to change PlayerVariationCtrl.
      // specialMove() to individual methods for each special move
      // TODO: resolve the move
      Move reMove = new Move();
      reMove.expand(model.level.currentBoard, point);
    }
    pVar.remove();
  }
}

@@ -14,16 +14,90 @@
 oller;%0A%0A
+import java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0A
 import b
@@ -123,16 +123,16 @@
 cation;%0A
-
 import m
@@ -168,16 +168,42 @@
 rModel;%0A
+import model.PlayerState;%0A
 import m
@@ -300,16 +300,41 @@
 oveCtrl 
+implements ActionListener
 %7B%0A  Play
@@ -511,20 +511,19 @@
 oid 
-mouseClicked
+startRemove
 (Poi
@@ -1135,11 +1135,119 @@
 e();%0A  %7D
+%0A%0A  @Override%0A  public void actionPerformed(ActionEvent arg0) %7B%0A%09model.playerState = PlayerState.REMOVE;%0A  %7D
 %0A%7D%0A

Fix format error in RemoveCtrl