File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ export const fetchPgnOfLichessGame = async (id: string): Promise<string> => {
7272 return res . text ( )
7373}
7474
75- export const fetchAnalyzedTournamentGame = async ( gameId = [ 'FkgYSri1' ] ) => {
75+ export const fetchAnalyzedWorldChampionshipGame = async (
76+ gameId = [ 'FkgYSri1' ] ,
77+ ) => {
7678 const res = await fetch (
7779 buildUrl ( `analysis/analysis_list/${ gameId . join ( '/' ) } ` ) ,
7880 )
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ import {
1616 getFavoritesAsWebGames ,
1717 addFavoriteGame ,
1818 removeFavoriteGame ,
19- updateFavoriteName ,
20- isFavoriteGame ,
2119} from 'src/lib/favorites'
2220import { MaiaGameListEntry } from 'src/types'
2321import { useRouter } from 'next/router'
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 fetchPgnOfLichessGame ,
1212 fetchAnalyzedMaiaGame ,
1313 fetchAnalyzedPgnGame ,
14- fetchAnalyzedTournamentGame ,
14+ fetchAnalyzedWorldChampionshipGame ,
1515 retrieveGameAnalysisCache ,
1616} from 'src/api'
1717import {
@@ -100,7 +100,7 @@ const AnalysisPage: NextPage = () => {
100100 ) => {
101101 let game
102102 try {
103- game = await fetchAnalyzedTournamentGame ( newId )
103+ game = await fetchAnalyzedWorldChampionshipGame ( newId )
104104 } catch ( e ) {
105105 router . push ( '/401' )
106106 return
Original file line number Diff line number Diff line change 11import { Player } from './player'
2+ import { BaseGame } from './common'
23import { AvailableMoves } from './puzzle'
3- import { Dispatch , SetStateAction } from 'react'
4- import { BaseGame , GameNode , GameTree } from './common'
54
65export interface MoveValueMapping {
76 [ move : string ] : number
@@ -16,19 +15,6 @@ export interface AnalyzedGame extends BaseGame {
1615 termination ?: Termination
1716}
1817
19- export interface BaseTreeControllerContext {
20- gameTree : GameTree
21- currentNode : GameNode
22- setCurrentNode : Dispatch < SetStateAction < GameNode > >
23- goToNode : ( node : GameNode ) => void
24- goToNextNode : ( ) => void
25- goToPreviousNode : ( ) => void
26- goToRootNode : ( ) => void
27- plyCount : number
28- orientation : 'white' | 'black'
29- setOrientation : ( orientation : 'white' | 'black' ) => void
30- }
31-
3218export interface MaiaEvaluation {
3319 value : number
3420 policy : { [ key : string ] : number }
Original file line number Diff line number Diff line change 1- import { GameTree } from './tree'
1+ import { GameNode , GameTree } from './tree'
2+ import { Dispatch , SetStateAction } from 'react'
23
34export * from './tree'
45
@@ -19,3 +20,16 @@ export interface RawMove {
1920export type Check = false | 'white' | 'black'
2021
2122export type Color = 'white' | 'black'
23+
24+ export interface BaseTreeControllerContext {
25+ gameTree : GameTree
26+ currentNode : GameNode
27+ setCurrentNode : Dispatch < SetStateAction < GameNode > >
28+ goToNode : ( node : GameNode ) => void
29+ goToNextNode : ( ) => void
30+ goToPreviousNode : ( ) => void
31+ goToRootNode : ( ) => void
32+ plyCount : number
33+ orientation : 'white' | 'black'
34+ setOrientation : ( orientation : 'white' | 'black' ) => void
35+ }
You can’t perform that action at this time.
0 commit comments