package jrummikub.view;

import java.util.ArrayList;
import java.util.List;

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

/**
 * Mock class for HandPanel
 */
public class MockHandPanel implements IHandPanel {
	/** */
	public MockEvent2<Stone, Boolean> stoneClickEvent = new MockEvent2<Stone, Boolean>();
	/** */
	public List<Pair<Stone, Position>> stones;
	/** */
	public Event2<Stone, Boolean> rangeClickEvent = new Event2<Stone, Boolean>();
	/** */
	public Event1<Position> clickEvent = new Event1<Position>();

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

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

	@Override
	public IEvent2<Stone, Boolean> getSetClickEvent() {
		// TODO Auto-generated method stub
		return null;
	}

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

	@Override
	public void setStones(Iterable<Pair<Stone, Position>> stones) {
		this.stones = new ArrayList<Pair<Stone, Position>>();

		for (Pair<Stone, Position> entry : stones) {
			this.stones.add(entry);
		}
	}

	@Override
	public void resetCurrentRow() {
		// TODO Auto-generated method stub

	}
}
