File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed
hooks/useTuringController Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ export const getPlayerStats = async (name?: string): Promise<PlayerStats> => {
4141 botNotRating : data . turing_elo as number ,
4242 botNotCorrect : data . turing_guesses_correct as number ,
4343 botNotWrong : data . turing_guesses_wrong as number ,
44+ botNotGames : ( data . turing_guesses_correct +
45+ data . turing_guesses_wrong ) as number ,
4446 botNotMax : data . turing_elo_max as number ,
4547 botNotMin : data . turing_elo_min as number ,
4648 botNotHours : data . turing_game_time as number ,
Original file line number Diff line number Diff line change @@ -34,16 +34,18 @@ export const LeaderboardEntry = ({
3434 | 'botNotRating'
3535 | 'handRating'
3636 | 'brainRating'
37+
3738 let highestRatingKey :
3839 | 'regularMax'
3940 | 'trainMax'
4041 | 'botNotMax'
4142 | 'handMax'
4243 | 'brainMax'
44+
4345 let gamesKey :
4446 | 'regularGames'
4547 | 'trainGames'
46- | 'botNotCorrect '
48+ | 'botNotGames '
4749 | 'handGames'
4850 | 'brainGames'
4951
@@ -70,7 +72,7 @@ export const LeaderboardEntry = ({
7072 case 'turing' :
7173 ratingKey = 'botNotRating'
7274 highestRatingKey = 'botNotMax'
73- gamesKey = 'botNotCorrect '
75+ gamesKey = 'botNotGames '
7476 gamesWonKey = 'botNotCorrect'
7577 break
7678 case 'hand' :
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export const useTuringController = () => {
8181 useEffect ( ( ) => {
8282 if ( gameTree && game ) {
8383 const mainLine = gameTree . getMainLine ( )
84- controller . setCurrentNode ( mainLine [ mainLine . length - 1 ] )
84+ controller . setCurrentNode ( mainLine [ 0 ] )
8585 }
8686 } , [ game ] )
8787
Original file line number Diff line number Diff line change @@ -75,13 +75,6 @@ async function fetchActiveUsersFromPostHog(): Promise<number | null> {
7575 } ) ,
7676 } )
7777
78- console . log ( `
79- SELECT count(DISTINCT person_id) as recent_users
80- FROM events
81- WHERE event = '$pageview'
82- AND timestamp > TIMESTAMP '${ twentyFourHoursAgo } '
83- ` )
84-
8578 if ( ! response . ok ) {
8679 const errorText = await response . text ( )
8780 throw new Error ( errorText )
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export interface PlayerStats {
3939 botNotRating : number
4040 botNotCorrect : number
4141 botNotWrong : number
42+ botNotGames : number
4243 botNotMax : number
4344 botNotMin : number
4445 botNotHours : number
You can’t perform that action at this time.
0 commit comments