Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2 committed Sep 29, 2024
1 parent fd92bb1 commit 2d6dff0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,9 @@ export class Renderer {

this.context.font = 'bold ' + (cellSize * 0.5) + 'px Georgia';

let drawBestMovesAtLoseLikelihood: number | null = null;

if (this.heatmap !== null) {
const bestMoveLoseLikelihood = this.getBestMoveLoseLikelihood()!;

if (this.drawBestMoves && this.game.conclusion === null) {
drawBestMovesAtLoseLikelihood = bestMoveLoseLikelihood;
}
}
const drawBestMovesAtLoseLikelihood = this.drawBestMoves && this.game.conclusion === null
? this.getBestMoveLoseLikelihood()
: null;

for (let y = 0; y < this.game.height; y++) {
for (let x = 0; x < this.game.width; x++) {
Expand Down

0 comments on commit 2d6dff0

Please sign in to comment.