dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit a7f3b2c4dadd622515ba56086c6d6055d8e09f8e
parent 101ab262f35795d381492ee2c87d7ff7f4c82064
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 14 Jun 2023 15:28:22 -0700

fix bug

Diffstat:
Mpkg/web/handlers/interceptors/chess.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/web/handlers/interceptors/chess.go b/pkg/web/handlers/interceptors/chess.go @@ -187,7 +187,7 @@ func (g *ChessGame) renderBoardHTML1(moveIdx int, position *chess.Position, isFl boardMap := position.Board().SquareMap() pieceInCheck := func(p chess.Piece) bool { - return last != nil && p.Color() == game.Position().Turn() && p.Type() == chess.King && last.HasTag(chess.Check) + return last != nil && p.Color() == position.Turn() && p.Type() == chess.King && last.HasTag(chess.Check) } sqIsBestMove := func(sq chess.Square) bool { return bestMove != nil && (bestMove.S1() == sq || bestMove.S2() == sq)