//
// RollViewController.h
#import <UIKit/UIKit.h>
#import <CoreMotion/CoreMotion.h>
#define kAccelerationThreshold 1.7
#define kUpdateInterval (1.0f / 60.0f)
@interface TossViewController : UIViewController <UIAccelerometerDelegate>{
IBOutlet UIImageView *imageView;
IBOutlet UIImageView *imageView2;
IBOutlet UIButton *toggleButton;
IBOutlet UISlider *animationSpeed;
IBOutlet UILabel *hopsPerSecond;
IBOutlet UILabel *startLabel;
IBOutlet UILabel *coinOneA; // 0th // The coinX labels
IBOutlet UILabel *coinOneB;
IBOutlet UILabel *coinOneC;
IBOutlet UILabel *coinOneD;
IBOutlet UILabel *coinOneE;
IBOutlet UILabel *coinOneF;
IBOutlet UILabel *coinOneG;
IBOutlet UILabel *coinOneH;
IBOutlet UILabel *coinOneI;
IBOutlet UILabel *coinOneJ; // 9th
IBOutlet UILabel *coinTwoA; // 0th
IBOutlet UILabel *coinTwoB;
IBOutlet UILabel *coinTwoC;
IBOutlet UILabel *coinTwoD;
IBOutlet UILabel *coinTwoE;
IBOutlet UILabel *coinTwoF;
IBOutlet UILabel *coinTwoG;
IBOutlet UILabel *coinTwoH;
IBOutlet UILabel *coinTwoI;
IBOutlet UILabel *coinTwoJ; // 9th
CMMotionManager *motionManager;
NSMutableArray *headsHeads; // array is decalared for the images
NSMutableArray *headsTails; // array is decalared for the images
NSMutableArray *tailsTails; // array is decalared for the images
NSMutableArray *tailsHeads; // array is decalared for the images
}
@property (retain, nonatomic) UIImageView *imageView;
@property (retain, nonatomic) UIImageView *imageView2;
@property (retain, nonatomic) UIButton *toggleButton;
@property (retain, nonatomic) UISlider *animationSpeed;
@property (retain, nonatomic) UILabel *hopsPerSecond;
@property (retain, nonatomic) IBOutlet UILabel *startLabel;
@property (retain, nonatomic) IBOutlet UILabel *coinOneA; // 0
@property (retain, nonatomic) IBOutlet UILabel *coinOneB;
@property (retain, nonatomic) IBOutlet UILabel *coinOneC;
@property (retain, nonatomic) IBOutlet UILabel *coinOneD;
@property (retain, nonatomic) IBOutlet UILabel *coinOneE;
@property (retain, nonatomic) IBOutlet UILabel *coinOneF;
@property (retain, nonatomic) IBOutlet UILabel *coinOneG;
@property (retain, nonatomic) IBOutlet UILabel *coinOneH;
@property (retain, nonatomic) IBOutlet UILabel *coinOneI;
@property (retain, nonatomic) IBOutlet UILabel *coinOneJ; // 9
@property (retain, nonatomic) IBOutlet UILabel *coinTwoA; // 0
@property (retain, nonatomic) IBOutlet UILabel *coinTwoB;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoC;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoD;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoE;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoF;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoG;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoH;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoI;
@property (retain, nonatomic) IBOutlet UILabel *coinTwoJ; // 9
@property (retain, nonatomic) NSMutableArray *headsHeads; // array is decalared for the images
@property (retain,nonatomic) NSMutableArray *headsTails; // array is decalared for the images
@property (retain,nonatomic) NSMutableArray *tailsTails; // array is decalared for the images
@property (retain,nonatomic) NSMutableArray *tailsHeads; // array is decalared for the images
// note the assign 15
// It wont let me release them in the dealloc, so im using assign
@property (nonatomic, retain) CMMotionManager *motionManager;
-(IBAction)toggleAnimation:(id)sender;
-(IBAction)setSpeed:(id)sender;
-(void) callValueFromSelect;
-(void) accelerometer;
-(void) rollTheDice;
-(void) fillArrays;
-(void) updateLabels; // method to update the tracking of the labels
@end