dkforest

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

commit 9fc3bfcaaf12fccf5daa3b917723510df9923486
parent 2aebd2fe7f81ed46706dba997170795763c5c4ec
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue,  6 Jun 2023 23:11:16 -0700

cleanup

Diffstat:
Mpkg/web/handlers/api/v1/chess.go | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pkg/web/handlers/api/v1/chess.go b/pkg/web/handlers/api/v1/chess.go @@ -278,10 +278,7 @@ func (g *ChessGame) DrawPlayerCard(isBlack, isYourTurn bool) string { } func (g *ChessGame) drawPlayerCard(roomName string, isBlack, isYourTurn bool) string { - enemy := g.Player2 - if isBlack { - enemy = g.Player1 - } + enemy := utils.Ternary(isBlack, g.Player1, g.Player2) imgB64 := g.renderBoardB64(isBlack)