Skip to content

Commit b169c4c

Browse files
committed
chore: fixup
Signed-off-by: moul <[email protected]>
1 parent 965f2b6 commit b169c4c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

realm/chess.gno

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ func MakeMove(gameID, from, to string, promote Piece) string {
361361

362362
caller := std.GetOrigCaller()
363363

364-
stats := getPlayerStats(caller)
365-
stats.Moves++
364+
// stats := getPlayerStats(caller)
365+
// stats.Moves++
366366

367367
if (isBlack && g.Black != caller) ||
368368
(!isBlack && g.White != caller) {

realm/stats.gno

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import (
77
)
88

99
type playerStats struct {
10-
Addr std.Address // Not stored when in avl.Tree, but lasily filled when returning a single or collection of player stats for other contracts.
10+
Addr std.Address // Not stored when in avl.Tree, but lazily filled for public-facing helpers returning playerStats.
1111
Moves uint
1212
StartedGames uint
1313
WonGames uint
1414
LostGames uint
1515
TimedoutGames uint
1616
ResignedGames uint
1717
DrawnGames uint
18-
SeriousGames uint // finished, or resigned/drawn after 20 full moves (40 turns)
18+
SeriousGames uint // finished, or resigned/drawn after 20 full moves (40 turns), used for the raffle.
1919
// later we can add achievements:
2020
// SuperFastAchievement // if a game is finished in less than N seconds.
2121
// OnlyPawnsAchievement // winning with only pawns, etc.
@@ -39,9 +39,9 @@ func AllPlayerStats() []playerStats {
3939
ret := []playerStats{}
4040

4141
allPlayerStats.Iterate("", "", func(addrString string, v interface{}) bool {
42-
stats := *(v.(*playerStats))
43-
stats.Addr = std.Address(addrString)
44-
ret = append(ret, stats)
42+
// stats := *(v.(*playerStats))
43+
// stats.Addr = std.Address(addrString)
44+
// ret = append(ret, stats)
4545
return false
4646
})
4747

0 commit comments

Comments
 (0)