<commit_before>package tictactoeGame;

import java.awt.Point;

import exceptions.InvalidMoveException;
import players.Player;
import players.PlayerID;
import playingField.FieldPosition;
import playingField.PlayingField;
import playingField.Positions;

public final class Move {
	
	private PlayingField field;
	private PlayerID id;
	private boolean moveMade;
	
	public Move(PlayingField field, Player turn) {
		this.field = field;
		this.id = turn.getPlayerID();
		moveMade = false;
	}
	
	public void makeMove(int x, int y) throws InvalidMoveException {
		this.makeMove(new Point(x,y));
	}
	
	public void makeMove(FieldPosition position) throws InvalidMoveException {
		checkWetherMoveWasMade();
		field.makeMove(Positions.fromTypeToPoint(position), position, id);
	}
	
	public void makeMove(Point position) throws InvalidMoveException {
		checkWetherMoveWasMade();
		field.makeMove(position, Positions.fromPointToType(position), id);
	}
	
	private void checkWetherMoveWasMade() throws InvalidMoveException {
		if(moveMade == false) {
			moveMade = true;
		} else {
			throw new InvalidMoveException();
		}
	}

}<commit_msg>Bug fixed: control flow of makeMove<commit_after>package tictactoeGame;

import java.awt.Point;

import exceptions.InvalidMoveException;
import players.Player;
import players.PlayerID;
import playingField.FieldPosition;
import playingField.PlayingField;
import playingField.Positions;

public final class Move {
	
	private PlayingField field;
	private PlayerID id;
	private boolean moveMade;
	
	public Move(PlayingField field, Player turn) {
		this.field = field;
		this.id = turn.getPlayerID();
		moveMade = false;
	}
	
	public void makeMove(int x, int y) throws InvalidMoveException {
		this.makeMove(new Point(x,y));
	}
	
	public void makeMove(FieldPosition position) throws InvalidMoveException {
		makeMove(Positions.fromTypeToPoint(position), position);
	}
	
	public void makeMove(Point position) throws InvalidMoveException {
		makeMove(position, Positions.fromPointToType(position));
	}
	
	private void makeMove(Point ppos, FieldPosition fpos) throws InvalidMoveException {
		if(moveMade) {
			throw new InvalidMoveException();
		}
		field.makeMove(ppos, fpos, id);
		moveMade = true;
	}

}
{'fraction_non_alphanumeric': 0.08824853669518234, 'fraction_numerical': 0.0, 'mean_word_length': 5.36676217765043, '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': '3367859', 'n_tokens_mistral': 720, 'n_tokens_neox': 649, 'n_words': 171}