home *** CD-ROM | disk | FTP | other *** search
- /*
- * You may freely copy, distribute and reuse the code in this example.
- * NeXT disclaims any warranty of any kind, expressed or implied, as to its
- * fitness for any particular use.
- */
-
-
-
- /*
- * import class headers and procedural include files
- */
-
- #import "Fishie.h"
- #import <stdio.h>
- #import <stdlib.h>
- #import <time.h>
-
-
- void main(int argc, char *argv[])
- {
- id myFishie;
-
- srand((unsigned)time(NULL)); /* init random number gen. from clock */
-
- printf("\n\n~~~~ Welcome to the Objective Sea. ~~~~\n");
- printf("~~~~ The water's really warm today! ~~~~\n");
-
- printf("\n\n~~~~ Making myFishie... ~~~~\n");
- myFishie = [[Fishie alloc] init];
-
- printf("\n\n~~~~ Swimming myFishie... ~~~~\n");
- [myFishie swim];
-
- printf("\n\n~~~~ Where is myFishie?... ~~~~\n");
- [myFishie hLoc];
- [myFishie vLoc];
-
- printf("\n\n~~~~ Incrementing H pos of myFishie... ~~~~\n");
- [myFishie hLoc];
- [myFishie incHBy:10];
- [myFishie hLoc];
-
- printf("\n\n~~~~ Come back soon! ~~~~\n");
- exit(0);
- }
-