package bwyap.familyfeud.game.state;

import bwyap.familyfeud.game.FFPlayStateMachine;

/**
 * This state is used to control the game play
 * @author bwyap
 *
 */
public class StatePlay extends FFState {
	
	private FFPlayStateMachine stateMachine;
	
	protected StatePlay() {
		super(FFStateType.PLAY);
	}

	@Override
	public void initState() {
		stateMachine = new FFPlayStateMachine();
		stateMachine.init();
	}
	
	@Override
	public void cleanupState() { }

	
}

@@ -79,16 +79,67 @@
 Machine;
+%0Aimport bwyap.familyfeud.game.InvalidDataException;
 %0A%0A/**%0A *
@@ -250,16 +250,75 @@
 ate %7B%0A%09%0A
+%09public static final int ACTION_EXECUTEPLAYACTION = 0x0;%0A%09%0A
 %09private
@@ -562,12 +562,396 @@
 () %7B %7D%0A%0A
+%09@Override%0A%09public boolean executeAction(int action, Object%5B%5D data) %7B%0A%09%09switch(action) %7B%0A%09%09case ACTION_EXECUTEPLAYACTION:%0A%09%09%09if (data%5B0%5D instanceof Integer) %7B%0A%09%09%09%09stateMachine.getCurrentState().executeAction((Integer)data%5B0%5D, data);%0A%09%09%09%7D%0A%09%09%09else throw new InvalidDataException(%22Expecting a %7BInteger, ...%7D when using action ACTION_EXECUTEPLAYACTION%22);%0A%09%09%09break;%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A
 %09%0A%7D%0A

Add executeAction method to StatePlay