<commit_before>package pylos.ai.move;

import pylos.ai.State;
import pylos.controller.Controller;
import pylos.model.Position;

public class Ply {

	public Position at;
	public Position[] removes;
	public boolean mount = false;

	public Ply(Position at, Position[] removes) {
		this.at = at;
		this.removes = removes;
	}

	public State applyAndSwitchPlayer(State s) {
		State state = new State(s);
		state.swichPlayers();
		return apply(s);
	}

	public State apply(State s) { // at and removes ply can be null
		State state = new State(s);
		if (at != null) {
			state.state[at.z][at.y][at.x] = state.currentPlayer;
			state.ballOnSide[s.currentPlayer]--;
		}
		if (removes != null) {
			for (Position remove : removes) {
				Position p = remove;
				state.state[p.z][p.y][p.x] = 0;
				state.ballOnSide[state.currentPlayer]++;
			}
		}
		return state;
	}

	public void makeMove() {
		Controller.placeAIBall(at, removes, mount);
	}
}<commit_msg>swichPlayers for real<commit_after>package pylos.ai.move;

import pylos.ai.State;
import pylos.controller.Controller;
import pylos.model.Position;

public class Ply {

	public Position at;
	public Position[] removes;
	public boolean mount = false;

	public Ply(Position at, Position[] removes) {
		this.at = at;
		this.removes = removes;
	}

	public State applyAndSwitchPlayer(State s) {
		State state = apply(s);
		state.swichPlayers();
		return state;
	}

	public State apply(State s) { // at and removes ply can be null
		State state = new State(s);
		if (at != null) {
			state.state[at.z][at.y][at.x] = state.currentPlayer;
			state.ballOnSide[s.currentPlayer]--;
		}
		if (removes != null) {
			for (Position remove : removes) {
				Position p = remove;
				state.state[p.z][p.y][p.x] = 0;
				state.ballOnSide[state.currentPlayer]++;
			}
		}
		return state;
	}

	public void makeMove() {
		Controller.placeAIBall(at, removes, mount);
	}
}
{'fraction_non_alphanumeric': 0.13643574828133262, 'fraction_numerical': 0.0010576414595452142, 'mean_word_length': 3.592233009708738, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4793210', 'n_tokens_mistral': 755, 'n_tokens_neox': 654, 'n_words': 167}