(watch rules)
(watch facts)
(defrule move-by-default
	?f <- (TurnRemaining ?x)
	(NewTurn)
	(not (OnTheMove))
    =>
    (retract ?f)
    (store TurnRight 60))

(defrule fire-when-scanning-anything
    (ScannedRobotEvent)
    =>
    	(store Fire 1)
	(store Power 10))

(defrule disparado-por-alguien
	?event<-(HitByBulletEvent)
	=>
	(store TurnLeft 90-(Bearing ?event))
	(retract ?event)
	(assert (NowTurningLeft)))


(defrule gira
	?fact <- (NowTurning Right)
	?cond <- (TurnRemaining ?x&:(= ?x 0))
	=>
	(retract ?fact)
	(retract ?cond)
	(store TurnRight 60)
    	(assert (NowTurning Right)))




