<commit_before>package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Iterator;

import boundary.PlayerApplication;
import model.Board;
import model.Cell;
import model.Move;
import model.PlayerModel;
import model.PlayerState;
import model.Point;
import model.Tile;

/**
 * @author <NAME>, <NAME>
 */
public class PlayerSwapCtrl implements ActionListener {
  PlayerApplication app;
  PlayerModel model;

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

  public void startSwap(Point point) {
    if (model.playerState != PlayerState.SWAP) {
      System.out.println("You borked it somehow (Triggered swap when player state != swap)");
      model.move = new Move();
      model.counter--;
    } else if (model.move.points.size() == 0) {
      model.move.expand(model.level.currentBoard, point);<commit_msg>Fixed swap fucntionality for RELEASE<commit_after>package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Iterator;

import boundary.PlayerApplication;
import model.Board;
import model.Cell;
import model.Move;
import model.PlayerModel;
import model.PlayerState;
import model.Point;
import model.Tile;
import model.Variation;

/**
 * @author <NAME>, <NAME>
 */
public class PlayerSwapCtrl implements ActionListener {
  PlayerApplication app;
  PlayerModel model;

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

  public void startSwap(Point point) {
    if (model.playerState != PlayerState.SWAP) {
      System.out.println("You borked it somehow (Triggered swap when player state != swap)");
      model.move = new Move();
      model.counter--;
    } else if (model.variation == Variation.RELEASE
    			&& model.level.currentBoard.grid[point.x][point.y].tile.number == 5) {
        model.move = new Move();
        model.counter--;
    } else if (model.move.points.size() == 0) {
      model.move.expand(model.level.currentBoard, point);
{'fraction_non_alphanumeric': 0.11753463927376971, 'fraction_numerical': 0.001433349259436216, 'mean_word_length': 3.962085308056872, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1856832', 'n_tokens_mistral': 625, 'n_tokens_neox': 619, 'n_words': 159}