All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdibpmn.examples.puzzle.Piece Maven / Gradle / Ivy

Go to download

The Jadex BDI-BPMN applications package contain several example applications, benchmarks and testcases using BDI agents that have BPMN plans.

There is a newer version: 2.4
Show newest version
package jadex.bdibpmn.examples.puzzle;

import java.io.Serializable;

/**
 *  A piece for playing.
 */
public class Piece	implements Serializable
{
	//-------- attributes --------

	/** The piece color (white or black). */
	protected boolean is_white;

	//-------- constructors --------

	/**
	 *  Create a new board.
	 */
	public Piece(boolean is_white)
	{
		this.is_white = is_white;
	}

	//-------- methods --------

	/**
	 *  Test, if it is a white piece.
	 *  @return True, if it a white piece.
	 */
	public boolean isWhite()
	{
		return is_white;
	}

	/**
	 *  Get the string representation.
	 *  @return The string representation.
	 */
	public String toString()
	{
		return isWhite()? "white": "black";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy