Skip to content

Commit

Permalink
allow user to disable the marking of the most recent stone
Browse files Browse the repository at this point in the history
  • Loading branch information
deebloo committed Mar 13, 2024
1 parent cd05473 commit 3d60cb2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ Being form associated also means that you can send data to your own servers with

## Attributes

| Item | description |
| -------- | --------------------------------------------------------------------- |
| coords | determines if the column and row lables are displayed |
| src | path to a sgf file. sfg files describe the steps in a game of go |
| debug | enables debug out put. will highlight hitboxes and log out game logic |
| readonly | disables manually placing stones |
| sfx | enable sound effects. Point to a directory with sound files |
| Item | description |
| ----------------- | --------------------------------------------------------------------- |
| coords | determines if the column and row lables are displayed |
| src | path to a sgf file. sfg files describe the steps in a game of go |
| debug | enables debug out put. will highlight hitboxes and log out game logic |
| readonly | disables manually placing stones |
| sfx | enable sound effects. Point to a directory with sound files |
| disablelastmarker | disable marking the last stone placed. Useful for documenting shapes |
4 changes: 3 additions & 1 deletion dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
</style>

<form action="/save-game">
<go-board name="board" sfx="/assets/sfx"></go-board>
<go-board name="board" sfx="/assets/sfx" disablelastmarker>
<go-stone slot="Q4" color="black"></go-stone>
</go-board>
</form>
</body>
</html>
4 changes: 3 additions & 1 deletion src/lib/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ export class GoBoardElement extends HTMLElement {
left: 0;
}
.row slot::slotted(go-stone:last-child)::after {
:host(:not([disablelastmarker]))
.row
slot::slotted(go-stone:last-child)::after {
content: "";
height: 50%;
width: 50%;
Expand Down

0 comments on commit 3d60cb2

Please sign in to comment.