//-*-c++-*-
#ifndef INCLUDE_RepeatAfterMe_h_
#define INCLUDE_RepeatAfterMe_h_

#include "Behaviors/Leapers.h"

#nodeclass RepeatAfterMe : StateNode
	#shortnodemethod setup
		#statemachine

		startnode: StateNode

		red: RedLEDOn

		yellow: YellowLEDOn

		green: GreenLEDOn

		nod: NodYes($, 1)

		shake: NodNo($, 1)

		win: Speak($, "Win")

		lose: Speak($, "lose")
				
		startnode =RND=> {red, yellow, green}

		red =B(ChiaraInfo::RedButOffset)=> nod

		red =B(ChiaraInfo::GreenButOffset)=> shake

		red =B(ChiaraInfo::YellowButOffset)=> shake

		yellow =B(ChiaraInfo::YellowButOffset)=> nod

		yellow =B(ChiaraInfo::RedButOffset)=> shake

		yellow =B(ChiaraInfo::GreenButOffset)=> shake

		green =B(ChiaraInfo::GreenButOffset)=> nod

		green =B(ChiaraInfo::RedButOffset)=> shake

		green =B(ChiaraInfo::YellowButOffset)=> shake

		nod =T(3000)=> win

		win =T(1000)=> startnode

		shake =T(3000)=> lose

		lose =T(1000)=> startnode

	#endstatemachine
#endnodeclass

#endif
