State Chart. Automated Payment State. Idle State. do/ displayAd. pressButton. washType = Wash. Wash Variables State. [button == Wash. ]. washType = WnW. WnW Variables State. [button == WnW. ]. washType = Double. Double Variables State. [button == Double. ]. washType = Super. Super Variables State. [button == Super. ]. [paid == true. ]. buttonPressed[button == Refund. ]. Wash Type Selection State. Automated Wash State. Car Washing State. Double Checking State. Wash State. Wax State. Super State. do/setLight(green). do/setLight(red). do/openDoor. [washType == Double. ]. and [count . <. 2. ]. [sensor: car in garage. ]. /. count = 0; closeDoor. do/sprayCar. do/soakCar. do/sudsCar. do/rinseCar. do/waxCar. do/sealCar. count. +. +. [washType == Wash. ]. [washType =/= Wash. ]. [washType == Super. ]. do/underbodyWash. do/wheelScrub.