dkforest

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

commit e24c6d3f93e5f061cc45a7767307b49dbf6b125a
parent 8eab04e13b16964b8aee4d45c8832cb55b4e9659
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 11 Jun 2023 20:10:24 -0700

cleanup

Diffstat:
Mpkg/web/handlers/interceptors/chess.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkg/web/handlers/interceptors/chess.go b/pkg/web/handlers/interceptors/chess.go @@ -128,7 +128,7 @@ func getID(row, col int, isFlipped bool) int { return id } -func (g *ChessGame) renderBoardHTML1(position *chess.Position, isFlipped bool, imgB64 string, spectator bool) string { +func (g *ChessGame) renderBoardHTML1(position *chess.Position, isFlipped bool, imgB64 string) string { moves := g.Game.Moves() var last *chess.Move if len(moves) > 0 { @@ -287,9 +287,9 @@ var pieceTypeMap = map[chess.PieceType]string{ chess.Pawn: "P", } -func (g *ChessGame) renderBoardHTML(isFlipped bool, imgB64 string, spectator bool) string { +func (g *ChessGame) renderBoardHTML(isFlipped bool, imgB64 string) string { position := g.Game.Position() - out := g.renderBoardHTML1(position, isFlipped, imgB64, spectator) + out := g.renderBoardHTML1(position, isFlipped, imgB64) return out } @@ -380,7 +380,7 @@ func (g *ChessGame) drawPlayerCard(key string, isBlack, isSpectator, isYourTurn "White": g.Player1, "Black": g.Player2, "Username": enemy.Username, - "Table": template.HTML(g.renderBoardHTML(isBlack, imgB64, false)), + "Table": template.HTML(g.renderBoardHTML(isBlack, imgB64)), "ImgB64": imgB64, "Outcome": g.Game.Outcome().String(), "GameOver": g.Game.Outcome() != chess.NoOutcome,