projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Abstract away the operations involving a sentinel value for coordinates.
[super-star-trek.git]
/
src
/
sst.c
diff --git
a/src/sst.c
b/src/sst.c
index 00e384e0520f2b4f6af7f3e6a7d8624c43e0bb60..ccf7470b64ea04fc4f39152e0fa75ff6e272f5a5 100644
(file)
--- a/
src/sst.c
+++ b/
src/sst.c
@@
-469,8
+469,8
@@
static void makemoves(void)
}
break;
case DOCK: // dock
}
break;
case DOCK: // dock
- dock(
1
);
- if (game.ididit) attack(
0
);
+ dock(
true
);
+ if (game.ididit) attack(
false
);
break;
case DAMAGES: // damages
dreprt();
break;
case DAMAGES: // damages
dreprt();
@@
-586,7
+586,7
@@
static void makemoves(void)
continue;
}
if (hitme && !game.justin) {
continue;
}
if (hitme && !game.justin) {
- attack(
2
);
+ attack(
true
);
if (game.alldone) break;
if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // went NOVA!
atover(false);
if (game.alldone) break;
if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // went NOVA!
atover(false);
@@
-639,7
+639,7
@@
int main(int argc, char **argv)
}
}
/* where to save the input in case of bugs */
}
}
/* where to save the input in case of bugs */
- logfp = fopen("sst-input.log", "w");
+ logfp = fopen("
/usr/tmp/
sst-input.log", "w");
setlinebuf(logfp);
fprintf(logfp, "seed %d\n", seed);
srand(seed);
setlinebuf(logfp);
fprintf(logfp, "seed %d\n", seed);
srand(seed);