-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnake.h
executable file
·46 lines (39 loc) · 1.08 KB
/
Snake.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// Snake.h
// TristanMcCormickNibbles
//
// Created by Tristan J. McCormick on 11/25/12.
// Copyright (c) 2012 Tristan J. McCormick. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "NibblesConstants.h"
#import "World.h"
#import "Direction.h"
#import "snakeQueue.h"
@interface Snake : NSObject {
snakeQueue *snakeQueue;
CGPoint location;
int snakeSize;
int growthRate;
World *world;
Direction *snakeDirection;
BOOL hasEaten;
BOOL isDead;
int growthSpurtCounter;
int foodCounter;
}
@property (nonatomic) Direction *snakeDirection;
@property (nonatomic) CGPoint location;
@property (nonatomic) int snakeSize;
@property (nonatomic) int growthRate;
@property (nonatomic) World *world;
@property (nonatomic) snakeQueue *snakeQueue;
@property (nonatomic) BOOL hasEaten;
@property (nonatomic) BOOL isDead;
@property (nonatomic) int growthSpurtCounter;
@property (nonatomic) int foodCounter;
-(id) initAtPoint:(CGPoint)point withSize:(int)size growthRate:(int)rate world:(World *)newWorld;
-(void)stretch;
-(void)shrink;
-(void) move;
@end