/FileExtraction/Java_unseen/njustesen_hero-aicademy/src/action/DropAction.java
package action;

import model.Card;
import model.Position;

public class DropAction extends Action {

	public Card type;
	public Position to;

	public DropAction(Card type, Position to) {
		super();
		this.type = type;
		this.to = to;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((to == null) ? 0 : to.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final DropAction other = (DropAction) obj;
		if (to == null) {
			if (other.to != null)
				return false;
		} else if (!to.equals(other.to))
			return false;
		if (type != other.type)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "DropAction [type=" + type + ", to=" + to + "]";
	}

}
