<commit_before>package model;

/**
 * Reprents a room in the game map
 * 
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 */
public class Room {

	private boolean isVisible, hasHunter;

	private Condition condition;

	/**
	 * Creates a room that is not visible and empty by default
	 */
	public Room()
	{
		isVisible = false;
		condition = Condition.EMPTY;
	}
	
	/**
	 * @return Whether or not this room can be displayed
	 */
	public boolean isVisible() {
		return isVisible;
	}

	/**
	 * @param isVisible Wehther or not this room can be displayed
	 */
	public void setVisible(boolean isVisible) {
		this.isVisible = isVisible;
	}

	/**
	 * @return True if the room is empty (no slime, wumpus, goop, etc). False otherwise
	 */
	public boolean isEmpty() {
		return this.condition == Condition.EMPTY;
	}

	/**
	 * Sets the condition of the room
	 * @param condition The new condition to set
	 */
	public void setCondition(Condition condition) {
		//If already wumpus or pit, don't change
		if(this.condition == Condition.PIT || this.condition == Condition.WUMPUS)
			return;
		//Check to see if the room is going to have blood AND slime, which yields goop
		if (this.condition == Condition.BLOOD && condition == Condition.SLIME) {
			this.condition = Condition.GOOP;
		} else if (this.condition == Condition.SLIME
				&& condition == Condition.BLOOD) {
			this.condition = Condition.GOOP;
		} else {
			this.condition = condition;
		}
	}

	/**
	 * @return The condition of the room
	 */
	public Condition getCondition() {
		return this.condition;
	}

	/**
	 * @return True if the wumpus is in this room, false otherwise
	 */
	public boolean hasWumpus() {
		return getCondition()==Condition.WUMPUS;
	}
	
	/**
	 * A string representation of this room.
	 * 
	 * <p>[ + 'Condition-Representation' + ]</p>
	 */
	public String toString(){
		
		if(!isVisible)
			return "[X]";
		return "[" + condition.getRepresentation() + "]";
		
	}
	
	public boolean hasHunter() {
		return this.hasHunter;
	}
	
	public void setHasHunter( boolean hasHunter ) {
		this.hasHunter = hasHunter;
	}
<commit_msg>Add room reset (to start new game)<commit_after>package model;

/**
 * Reprents a room in the game map
 * 
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 */
public class Room {

	private boolean isVisible, hasHunter;

	private Condition condition;

	/**
	 * Creates a room that is not visible and empty by default
	 */
	public Room()
	{
		isVisible = false;
		condition = Condition.EMPTY;
	}
	
	/**
	 * @return Whether or not this room can be displayed
	 */
	public boolean isVisible() {
		return isVisible;
	}

	/**
	 * @param isVisible Wehther or not this room can be displayed
	 */
	public void setVisible(boolean isVisible) {
		this.isVisible = isVisible;
	}

	/**
	 * @return True if the room is empty (no slime, wumpus, goop, etc). False otherwise
	 */
	public boolean isEmpty() {
		return this.condition == Condition.EMPTY;
	}

	/**
	 * Sets the condition of the room
	 * @param condition The new condition to set
	 */
	public void setCondition(Condition condition) {
		//If already wumpus or pit, don't change
		if(this.condition == Condition.PIT || this.condition == Condition.WUMPUS)
			return;
		//Check to see if the room is going to have blood AND slime, which yields goop
		if (this.condition == Condition.BLOOD && condition == Condition.SLIME) {
			this.condition = Condition.GOOP;
		} else if (this.condition == Condition.SLIME
				&& condition == Condition.BLOOD) {
			this.condition = Condition.GOOP;
		} else {
			this.condition = condition;
		}
	}

	/**
	 * @return The condition of the room
	 */
	public Condition getCondition() {
		return this.condition;
	}

	/**
	 * @return True if the wumpus is in this room, false otherwise
	 */
	public boolean hasWumpus() {
		return getCondition()==Condition.WUMPUS;
	}
	
	/**
	 * A string representation of this room.
	 * 
	 * <p>[ + 'Condition-Representation' + ]</p>
	 */
	public String toString(){
		
		if(!isVisible)
			return "[X]";
		return "[" + condition.getRepresentation() + "]";
		
	}
	
	public boolean hasHunter() {
		return this.hasHunter;
	}
	
	public void setHasHunter( boolean hasHunter ) {
		this.hasHunter = hasHunter;
	}

	/**
	 * resets the room
	 */
	public void reset()
	{
		this.condition = Condition.EMPTY;
		this.hasHunter = false;
		this.isVisible = false;
	}
{'fraction_non_alphanumeric': 0.12100456621004566, 'fraction_numerical': 0.0, 'mean_word_length': 3.15260663507109, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '766889', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1359, 'n_words': 444}