Late-night programming

package
{
	import net.natebeck.Nate;
	import net.natebeck.events.NateEvent;
	import com.bugquash.Project;
	import flash.event.Event;
 
	public class BugQuash
	{
		protected var pokeCount:int;
		protected var baller:Nate;
 
		public function BugQuash()
		{
			baller = new Nate();
 
			baller.addEventListener(NateEvent.GETTING_TIRED, onGettingTired);
			baller.addEventListener(Event.COMPLETE, onComplete);
 
			baller.generateCode(Project.QUASHBOARD);
			baller.generateCode(Project.QUASHBOARD_ADMIN);
			baller.generateCode(Project.SERVER_LOGIC);
 
			baller.loadTest(Project.SERVER_LOGIC);
		}
 
		protected function onGettingTired(event:NateEvent):void
		{
			baller.caffinate();
		}
 
		protected function onComplete(event:Event):void
		{
			baller.sleep();
		}
 
		public function poke():void
		{
			if(++pokeCount < 4) 
			{
				baller.say("Ouch!");
			}
			else 
			{
				baller.say("Hey... that's kind of nice");
			}
		}
	}
}

Related Posts

Comments Closed