File tree Expand file tree Collapse file tree 7 files changed +628
-0
lines changed
kaggle_environments/envs/open_spiel_env/games/go/visualizer/default Expand file tree Collapse file tree 7 files changed +628
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7+ < title > Go Visualizer</ title >
8+ </ head >
9+ < body >
10+ < div id ="app "> </ div >
11+ < script type ="module " src ="/src/main.ts "> </ script >
12+ </ body >
13+ </ html >
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @kaggle-environments/go-visualizer" ,
3+ "private" : true ,
4+ "version" : " 0.0.0" ,
5+ "type" : " module" ,
6+ "scripts" : {
7+ "dev" : " vite" ,
8+ "dev-with-replay" : " cross-env VITE_REPLAY_FILE=./replays/test-replay.json vite" ,
9+ "build" : " tsc && vite build" ,
10+ "preview" : " vite preview"
11+ },
12+ "devDependencies" : {
13+ "cross-env" : " ^10.1.0" ,
14+ "typescript" : " ^5.0.0" ,
15+ "vite" : " ^5.0.0"
16+ },
17+ "dependencies" : {
18+ "@kaggle-environments/core" : " workspace:*" ,
19+ "htm" : " ^3.1.1" ,
20+ "preact" : " ^10.13.2"
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ import { createReplayVisualizer , LegacyAdapter } from '@kaggle-environments/core' ;
2+ import { renderer } from './renderer.js' ;
3+
4+ const app = document . getElementById ( 'app' ) ;
5+ if ( ! app ) {
6+ throw new Error ( 'Could not find app element' ) ;
7+ }
8+
9+ const adapter = new LegacyAdapter ( renderer as any ) ;
10+ if ( app ) {
11+ // Set up an HMR boundary for development
12+ if ( import . meta. env ?. DEV && import . meta. hot ) {
13+ import . meta. hot . accept ( ) ;
14+ }
15+ createReplayVisualizer ( app , adapter ) ;
16+ }
You can’t perform that action at this time.
0 commit comments