#pragma once

#include "ofMain.h"
#include "ofxiPhone.h"
#include "ofxiPhoneExtras.h"
#include "eventsObject.h"
#include "spring.h"
#include "noiseField.h"
#include "particle.h"
#include "vectorField.h"
#include "ofxALSoundPlayer.h"


class testApp : public ofxiPhoneApp {
	
public:
	void setup();
	void update();
	void draw();
	void killParticles();
	void restart();


	
	void touchDown(ofTouchEventArgs &touch);
	void touchMoved(ofTouchEventArgs &touch);
	void touchUp(ofTouchEventArgs &touch);
	void touchDoubleTap(ofTouchEventArgs &touch);
	
	//method that will receive events from ofxEventsAddon
	void newFloat(float & f);
	void newInt(int & i);
	
	eventsObject evObject;
	ofEventArgs	 voidEventArgs;

	string floatMsg;
	string intMsg;
	string expireMsg;
	
	bool enabled;
	int w,h;
	int w2,h2;
	
	//new stuff for particles
	
	vector <particle *> movingParticles;
	vector <particle *> myParticles;

	vector <ofPoint> initPos;
	
	ofImage picture;
	ofImage boatImage;
	
	ofPoint InitAccelData;
	ofPoint currentAccelData;


	

	//BURCUM CODE
	
	//The Boat
	vector <particle> boat;
	
	// let's make a vector of them
	vectorField VF;
	noiseField NF;
	
	bool bFade;
	
	
	//sharks
	ofImage	sharkImage;
	vector <particle> sharks;

	
	
	//springs
	// let's make a vector of them
	vector <particle *> particles2;
	vector <spring> springs;
	
	ofImage picture2;
	
	//whirlpool
	vector <particle *> particlesW;
	vector <particle *> particles2W;
	
	ofImage pictureW;
	
	//vectorfield
	vector <ofPoint> wp;
	vector <ofPoint> wp2;
	
	//boat
	ofImage pictureB;
	
	//background images
	ofImage winBack;
	ofImage loseBack;
	
	int sec;
	bool bHit;
	bool bWin;
	int start;

	ofImage	background;

	
	//treasure
	ofImage	treasureImage;
	vector <particle> treasure;
	
	//timer
	float lastTime;
	
	
	
};

