#include <cstring>
#include <cstdlib>
#include <time.h>
+#include <cstdio>
const int podmax = 8;
const int bulletmax = 10;
char radar[1]; //radar symbol
};
+int high_score(){
+
+ return score;
+};
+
+void record_score(int score){
+
+};
+
int check_collision(game_object object1, game_object object2){
int collided = 0;
int spacing = 2;
//high score
+ int hscore = 0;
+ int hscores[10];
+ char hname[15];
+ char hnames[10][15];
+ //char hold[200];
+ char hold[20];
+ FILE *scorefile = fopen("/var/games/curfender/scores", "r"); //might want to handle failure, eventually
+ for(int x=0;x<10;x++){
+ char *workchara;
+ char *workcharb;
+ fgets(hold, 20, scorefile);
+ workchara = strtok(hold, " ");
+ workcharb = strpbrk(hold, " ");
+ //strncpy(workchara, hold, 5);
+ //strncpy(workcharb, hold, 15);
+ hscores[x] = atoi(workchara);
+ strcpy(hnames[x], workcharb);
+ };
+ fclose(scorefile);
+ for(int x=0;x<10;x++){
+ if(hscores[x]>hscore){
+ hscore=hscores[x];
+ strcpy(hname,hnames[x]);
+ };
+ };
+
+ //strcpy(hname, "limb");//debug
+ mvprintw(13,34,"High Score: %s %d",hname,hscore);
+
//get the cursor out of the way
mvprintw(23,79,"-");