package jrummikub.view;

import jrummikub.model.Position;
import jrummikub.model.Stone;
import jrummikub.model.StoneSet;
import jrummikub.util.Event1;
import jrummikub.util.Event2;
import jrummikub.util.IEvent1;
import jrummikub.util.IEvent2;
import jrummikub.util.Pair;

/**
 * Mock class for TablePanel
 */
public class MockTablePanel implements ITablePanel {

	/** */
	public Event2<Stone, Boolean> stoneClickEvent = new Event2<Stone, Boolean>();
	/** */
	public Event2<Stone, Boolean> setClickEvent = new Event2<Stone, Boolean>();
	/** */
	public Event2<Stone, Boolean> rangeClickEvent = new Event2<Stone, Boolean>();
	/** */
	public Event1<Position> clickEvent = new Event1<Position>();
	/** */
	public Event1<StoneSet> leftConnectorClickEvent = new Event1<StoneSet>();
	/** */
	public Event1<StoneSet> rightConnectorClickEvent = new Event1<StoneSet>();

	/** */
	public MockStoneCollectionPanel stoneCollectionPanel = new MockStoneCollectionPanel();
	/** */
	public String leftPlayerName;
	/** */
	public String topPlayerName;
	/** */
	public String rightPlayerName;

	/** */
	public Iterable<Pair<StoneSet, Position>> stoneSets;

	@Override
	public IEvent2<Stone, Boolean> getStoneClickEvent() {
		return stoneClickEvent;
	}

	@Override
	public IEvent2<Stone, Boolean> getRangeClickEvent() {
		return rangeClickEvent;
	}

	@Override
	public IEvent2<Stone, Boolean> getSetClickEvent() {
		return setClickEvent;
	}

	@Override
	public IEvent1<Position> getClickEvent() {
		return clickEvent;
	}

	@Override
	public void setLeftPlayerName(String playerName) {
		leftPlayerName = playerName;
	}

	@Override
	public void setTopPlayerName(String playerName) {
		topPlayerName = playerName;
	}

	@Override
	public void setRightPlayerName(String playerName) {
		rightPlayerName = playerName;
	}

	@Override
	public void setStoneSets(Iterable<Pair<StoneSet, Position>> stoneSets) {
		this.stoneSets = stoneSets;
	}

	@Override
	public IStoneCollectionPanel getStoneCollectionPanel() {
		return stoneCollectionPanel;
	}

	@Override
	public Event1<StoneSet> getLeftConnectorClickEvent() {
		return leftConnectorClickEvent;
	}

	@Override
	public Event1<StoneSet> getRightConnectorClickEvent() {
		return rightConnectorClickEvent;
	}

}
