aoc-2015/jour14/raindeer.h

27 lines
643 B
C
Raw Permalink Normal View History

2021-03-25 17:35:10 +00:00
#import <Foundation/Foundation.h>
@interface Raindeer : NSObject
{
NSString *name;
int speed;
int boostTime;
int pause;
2021-03-26 15:53:45 +00:00
int points;
int cooldown;
int hypervitesse;
int distance;
2021-03-25 17:35:10 +00:00
}
// permet de générer des setters et getter selon des attributs
// ici retain, nonatomic et assign
@property (retain, nonatomic) NSString *name;
2021-03-26 15:53:45 +00:00
@property (assign) int speed, boostTime, pause, points, cooldown, hypervitesse, distance;
2021-03-25 17:35:10 +00:00
+ (id) initWithName:(NSString*)name zatSpeed:(int)speed boostTime:(int)timeSpeed LunchTime:(int)pause;
- (int) calculDistance:(int)time;
2021-03-29 23:49:26 +00:00
- (void) updateDistance;
2021-03-26 15:53:45 +00:00
- (void) updatePoints;
2021-03-25 17:35:10 +00:00
@end