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

jadex.bdibpmn.examples.puzzle.BoardControlPanel 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.

The newest version!
package jadex.bdibpmn.examples.puzzle;

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

import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *  The control part of
 */
public class BoardControlPanel extends JPanel
{
	//-------- constructors --------

	/**
	 *  Create a new board control panel.
	 */
	public BoardControlPanel(final IBoard board, BoardPanel bp)
	{
		bp.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent e)
			{
				//System.out.println("Action event: "+e);
				Position p = (Position)e.getSource();

				List pmoves = board.getPossibleMoves();
				boolean moved = false;
				for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy