More fixes

This commit is contained in:
Neale Pickett 2014-07-28 20:32:24 +00:00
parent 962e08bd50
commit dfacb42dee
5 changed files with 76 additions and 80 deletions

View File

@ -1,14 +1,10 @@
BUGS
====
* Fix "random" bug
* Pull fuzzie tree
Requests
========
* Keep 12 hours of runs (720 runs)
* Merge devdsp fixes (https://github.com/devdsp/tanks/commits/master)
* Fix leaderboard
* Read sensors from "sensors" and not "sensor[0-9]"

View File

@ -317,7 +317,7 @@ tanks_move_tank(struct tanks_game *game,
to be a penalty for having the treads go in opposite directions.
This probably plays hell with precisely-planned tanks, which I
find very ha ha. */
friction = .75 * (fabsf(tank->speed.current[0] - tank->speed.current[1]) / 200);
friction = TANK_FRICTION * (fabsf(tank->speed.current[0] - tank->speed.current[1]) / 200);
v[0] = tank->speed.current[0] * (1 - friction) * (TANK_TOP_SPEED / 100.0);
v[1] = tank->speed.current[1] * (1 - friction) * (TANK_TOP_SPEED / 100.0);

View File

@ -14,6 +14,7 @@
#define TANK_MAX_ACCEL 35
#define TANK_MAX_TURRET_ROT (TAU/8)
#define TANK_TOP_SPEED 7
#define TANK_FRICTION 0.75
/* (tank radius + tank radius)^2 */
#define TANK_COLLISION_ADJ2 \

View File

@ -25,7 +25,7 @@ fn=$(printf "round-%04d.html" $next)
rfn=results$$.txt
# Clean up old games
ofn=$(printf "round-%04d.html" $(expr $next - 20))
ofn=$(printf "round-%04d.html" $(expr $next - 720))
echo "Removing $ofn"
rm -f $ofn
@ -64,8 +64,7 @@ cat <<EOF >>$fn
</html>
EOF
summary.awk $tanks > summary.html.$$
mv summary.html.$$ summary.html
summary.awk $tanks > summary.html.$$ && mv summary.html.$$ summary.html
echo "done."

View File

@ -75,7 +75,7 @@ BEGIN {
print " <h2>Rounds</h2>";
print " <ul>";
getline rounds < "next-round";
for (i = rounds - 1; i >= rounds - 21; i -= 1) {
for (i = rounds - 1; (i >= rounds - 720) && (i > 0); i -= 1) {
printf("<li><a href=\"round-%04d.html\">%04d</a></li>\n", i, i);
}
print " </ul>";