From b2c6f1a65c2d50226588bdff0929ab290b6e7785 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Tue, 8 Sep 2026 23:56:21 -0700 Subject: [PATCH] Post whole days to the board The shared service ranks on integer columns, so a patrol that ended with 9.4 days on the orders posts 9. The report screen still shows the tenth, which is where it means something -- on a board it would be measuring the dice rather than the captain. --- README.md | 5 ++++- src/App.tsx | 3 ++- src/components/screens.tsx | 5 +++-- src/game/highscores.ts | 8 +++++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 12b7850..f4bd2e0 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,10 @@ their own galaxy, dealt off the same seed. One board, shared by everybody. Ending a session posts every captain in the party, and the top 50 comes back ranked best first: raiders destroyed, then -days left on the orders, then torpedoes still in the racks. +whole days left on the orders, then torpedoes still in the racks. Days are +whole on the board and shown to a tenth in the game — the service's ranked +columns are integers, and a tie-break finer than a day would be measuring +the dice rather than the captain. There is no way to clear it. A captain leaves the list only by being pushed off the bottom by a better one. diff --git a/src/App.tsx b/src/App.tsx index ecf480e..3ea8c06 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -185,7 +185,8 @@ export default function App() { captains.map((c) => ({ name: c.name, killed: c.killed, - daysLeft: c.daysLeft, + // Whole days: the board's ranked columns are integers. + daysLeft: Math.floor(c.daysLeft), torpedoes: c.torpedoes, ending: c.outcome, })), diff --git a/src/components/screens.tsx b/src/components/screens.tsx index 5a5c4a0..245333d 100644 --- a/src/components/screens.tsx +++ b/src/components/screens.tsx @@ -309,7 +309,8 @@ export function HighScoreScreen({ return (
THE BOARD - RANKED ON RAIDERS DESTROYED, THEN DAYS LEFT, THEN TORPEDOES. + RANKED ON RAIDERS DESTROYED, THEN WHOLE DAYS LEFT, THEN + TORPEDOES. {state === 'loading' && ASKING THE MACHINE...} {state === 'error' && ( @@ -326,7 +327,7 @@ export function HighScoreScreen({ scores.map((s, i) => ( {String(i + 1).padStart(2)}. {s.name.padEnd(MAX_NAME)}{' '} - {String(s.killed).padStart(2)} {s.daysLeft.toFixed(1).padStart(5)}{' '} + {String(s.killed).padStart(2)} {String(s.daysLeft).padStart(3)}{' '} {String(s.torpedoes).padStart(2)} ))} diff --git a/src/game/highscores.ts b/src/game/highscores.ts index 67171df..4170019 100644 --- a/src/game/highscores.ts +++ b/src/game/highscores.ts @@ -24,7 +24,13 @@ export interface Score { name: string /** Raiders destroyed. The rank, before any tie-break. */ killed: number - /** Days still on the orders when the patrol ended. */ + /** + * Whole days still on the orders when the patrol ended. + * + * The game counts days to a tenth and the board ranks on integers, so this + * is the floor of what the report screen shows. A tie-break finer than a + * day would be measuring the dice rather than the captain. + */ daysLeft: number /** Torpedoes still in the racks. */ torpedoes: number