package jp.ac.kyutech.mns.ist.filter;

import java.awt.Color;
import java.util.ArrayList;

import jp.ac.kyutech.mns.ist.ShortStroke;

public class BaseSSAction {
	ArrayList<ShortStroke> sslist;
	ArrayList<ShortStroke> sslist_notpicked;

	public BaseSSAction(){
		sslist = new ArrayList<ShortStroke>();
		sslist_notpicked = new ArrayList<ShortStroke>();
	}
	public void beforePickUp(){
		sslist.clear();
		sslist_notpicked.clear();
	}
	public void afterPickUp(){
		System.out.println("Picked: "+sslist.size());
		System.out.println("Not Picked: "+sslist_notpicked.size());
	}
	/**
	 * ここに，単独チェックでのピックアップ条件を満たしたときの処理を書く
	 * @param ss
	 */
	public void processPickedUp(ShortStroke ss){
		sslist.add(ss);
		ss.animateToFlushColor(Color.red, 1000, 0);
//		ss.addActivity(a1);
//		ss.addActivity(a2);
	}
	public void processNotPickedUp(ShortStroke ss){
		sslist_notpicked.add(ss);
		ss.animateToFlushColor(Color.blue, 1000, 1200);
	}
	/**
	 * ここに，ペアチェックでのピックアップ条件を満たしたときの処理をかく
	 * @param ss1
	 * @param ss2
	 * @return
	 */
	public void processPickedUpByPair(ShortStroke ss1, ShortStroke ss2){
		sslist.add(ss2);
	}
	public void processNotPickedUpByPair(ShortStroke ss1, ShortStroke ss2){
		sslist_notpicked.add(ss2);
	}
	public void beforePairPickUp(){
		sslist.clear();
		sslist_notpicked.clear();
	}
	public void afterPairPickUp(){

	}
}
