Skip to content

Commit

Permalink
Don't spam numbers and triangles for every stone for demo boards
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Aug 23, 2024
1 parent 1b81944 commit c5bb09a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goban-engine",
"version": "8.3.24",
"version": "8.3.25",
"description": "",
"main": "build/goban-engine.js",
"types": "build/engine/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goban",
"version": "8.3.24",
"version": "8.3.25",
"description": "",
"main": "build/goban.js",
"types": "build/src/index.d.ts",
Expand Down
14 changes: 8 additions & 6 deletions src/Goban/SVGRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1938,13 +1938,15 @@ export class SVGRenderer extends Goban implements GobanSVGInterface {
) {
const m = this.engine.getMoveByLocation(i, j, false);
if (m && !m.trunk) {
if (m.edited) {
//letter = "triangle";
if (this.engine.board[j][i]) {
alt_marking = "triangle";
const move_diff = m.getMoveNumberDifferenceFromTrunk();
if (move_diff !== m.move_number) {
if (m.edited) {
if (this.engine.board[j][i]) {
alt_marking = "triangle";
}
} else {
letter = move_diff.toString();
}
} else {
letter = m.getMoveNumberDifferenceFromTrunk().toString();
}
}
}
Expand Down

0 comments on commit c5bb09a

Please sign in to comment.