package szakdolgozat.client.servereventlistener;

import szakdolgozat.client.serverevents.MessageEvent;
import szakdolgozat.client.serverevents.MoveEvent;
import de.novanic.eventservice.client.event.Event;
import de.novanic.eventservice.client.event.listener.RemoteEventListener;

public abstract class GameEventsListener implements RemoteEventListener {

	@Override
	public void apply(Event anEvent) {
		if (anEvent instanceof MoveEvent)
			onMoveEvent((MoveEvent) anEvent);
		else if (anEvent instanceof MessageEvent)
			onMessageEvent((MessageEvent) anEvent);

	}

	public abstract void onMessageEvent(MessageEvent event);

	public abstract void onMoveEvent(MoveEvent event);

}
