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.
This commit is contained in:
@@ -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.
|
||||
|
||||
+2
-1
@@ -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,
|
||||
})),
|
||||
|
||||
@@ -309,7 +309,8 @@ export function HighScoreScreen({
|
||||
return (
|
||||
<div className="stack board">
|
||||
<Line className="accent">THE BOARD</Line>
|
||||
<Line className="dim">RANKED ON RAIDERS DESTROYED, THEN DAYS LEFT, THEN TORPEDOES.</Line>
|
||||
<Line className="dim">RANKED ON RAIDERS DESTROYED, THEN WHOLE DAYS LEFT, THEN
|
||||
TORPEDOES.</Line>
|
||||
<Line> </Line>
|
||||
{state === 'loading' && <Line>ASKING THE MACHINE...</Line>}
|
||||
{state === 'error' && (
|
||||
@@ -326,7 +327,7 @@ export function HighScoreScreen({
|
||||
scores.map((s, i) => (
|
||||
<Line key={s.id} className={highlight.includes(s.id) ? 'accent' : ''}>
|
||||
{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)}
|
||||
</Line>
|
||||
))}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user