Skip to content

Commit

Permalink
Make timer "burn down" instead of "filling up" (fix #46)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcreedcmu committed Nov 12, 2023
1 parent 5ba2fb7 commit 496a2a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ui/instructions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ function render(ci: CanvasInfo, props: CanvasProps) {
drawBubble(ci, `Click in this space (or hit [spacebar])\n to get more tiles.`,
{ x: 670, y: 347 }, { x: 732, y: 290 });

drawBubble(ci, `This is the panic bar. If it\nfills up all the way to\nthe right, you lose!\nYou\x27re safe when your hand is\nempty, and all tiles form words.`,
{ x: 133, y: 453 }, { x: 221, y: 593 });
drawBubble(ci, `This is the panic bar. When it\nruns out, you lose!\nYou\x27re safe when your hand is\nempty, and all tiles form words.`,
{ x: 163, y: 453 }, { x: 301, y: 593 });
d.restore();
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ export function rawPaint(ci: CanvasInfo, state: GameState) {
const panic_fraction = getPanicFraction(state.panic);
const panic_rect_in_canvas: Rect = {
p: {
x: canvas_bds_in_canvas.p.x,
x: canvas_bds_in_canvas.p.x + canvas_bds_in_canvas.sz.x * panic_fraction,
y: canvas_bds_in_canvas.p.y + canvas_bds_in_canvas.sz.y - PANIC_THICK,
},
sz: {
x: canvas_bds_in_canvas.sz.x * panic_fraction,
x: canvas_bds_in_canvas.sz.x * (1 - panic_fraction),
y: PANIC_THICK,
}
};
Expand Down

0 comments on commit 496a2a0

Please sign in to comment.