Closed qcgm1978 closed 11 months ago
Hmm... In the official version, each stone has its own facial expression based on the ownership. So, losing this feature on the last stone is unfortunate.
We already have the last stone marker, a black or white circle around the last facial stone, but it will be unnoticeable on your stone emoji. How about making it more prominent? This is a crude example.
--- a/src/draw_goban.js
+++ b/src/draw_goban.js
@@ -625,11 +625,12 @@ function draw_stone(h, xy, radius, draw_last_p, draw_loss_p, g) {
g.fillStyle = h.black ? b_color : w_color
with_gray_stone(edged_fill_circle, xy, radius, g)
}
+ // draw last stone mark BEHIND the stone
+ draw_last_p && h.last && h.move_count > R.init_len &&
+ draw_last_move(h, xy, radius, g)
stone_image ? draw_stone_by_image() :
style === '3D' ? draw_stone_by_gradation() : draw_stone_by_paint()
draw_loss_p && !hide_loss_p && draw_loss(h, xy, radius, g)
- draw_last_p && h.last && h.move_count > R.init_len &&
- draw_last_move(h, xy, radius, g)
h.movenums && draw_movenums(h, xy, radius, g)
}
@@ -706,8 +707,8 @@ function draw_text_on_stone(text, color, xy, radius, g) {
function draw_last_move(h, xy, radius, g) {
const facep = face_image_p() && !h.movenums
const bturn = xor(h.black, facep), size = facep ? 1 : 0.8
- g.strokeStyle = bturn ? WHITE : BLACK; g.lineWidth = 2
- circle(xy, radius * size, g)
+ g.strokeStyle = bturn ? '#f0f' : '#0f0'; g.lineWidth = 8
+ square_around(xy, radius * size, g)
}
const next_move_line_width = 3, branch_line_width = next_move_line_width
I'm not sure what mark is nice for wide variety of stone images. It must be visible, but it shouldn't be too "loud".
I tried it, and it is an interesting solution. However, I would prefer to see the number of moves that have been made in the game. If it is marked as a number, there is no need to adjust the style. However, this is a personal preference.
When using stone as face, all the pieces on the board are displayed as emojis, which can cause the last move to be confused with other pieces, making it difficult to see where the last move was made. For example, the following changes could be made:
https://github.com/kaorahi/lizgoban/assets/3024299/684d1572-e227-49c7-8aa0-79ef98624313