Skip to content

Commit 5dee7d7

Browse files
feat: clean up board controller
1 parent 8ff2bcb commit 5dee7d7

9 files changed

Lines changed: 115 additions & 473 deletions

File tree

src/components/Board/AnalysisBoardController.tsx

Lines changed: 0 additions & 127 deletions
This file was deleted.

src/components/Board/GameplayTreeInterface.tsx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
ExportGame,
2020
StatsDisplay,
2121
AnalysisMovesContainer,
22-
PlayBoardController,
22+
TreeBoardController,
2323
PromotionOverlay,
2424
TreeGameBoard,
2525
} from 'src/components'
@@ -236,7 +236,17 @@ export const GameplayTreeInterface: React.FC<React.PropsWithChildren<Props>> = (
236236
</div>
237237
<div>{props.children}</div>
238238
<div className="flex-none">
239-
<PlayBoardController />
239+
<TreeBoardController
240+
orientation={orientation}
241+
setOrientation={setOrientation}
242+
currentNode={currentNode}
243+
plyCount={plyCount}
244+
goToNode={goToNode}
245+
goToNextNode={goToNextNode}
246+
goToPreviousNode={goToPreviousNode}
247+
goToRootNode={goToRootNode}
248+
gameTree={gameTree}
249+
/>
240250
</div>
241251
{timeControl != 'unlimited' ? (
242252
<GameClock player={orientation} reversed={true} />
@@ -281,7 +291,17 @@ export const GameplayTreeInterface: React.FC<React.PropsWithChildren<Props>> = (
281291
<GameClock player={orientation} reversed={true} />
282292
) : null}
283293
<div className="flex-none">
284-
<PlayBoardController />
294+
<TreeBoardController
295+
orientation={orientation}
296+
setOrientation={setOrientation}
297+
currentNode={currentNode}
298+
plyCount={plyCount}
299+
goToNode={goToNode}
300+
goToNextNode={goToNextNode}
301+
goToPreviousNode={goToPreviousNode}
302+
goToRootNode={goToRootNode}
303+
gameTree={gameTree}
304+
/>
285305
</div>
286306
<div className="w-full overflow-x-auto">
287307
<div className="flex flex-row whitespace-nowrap py-2">

src/components/Board/PlayBoardController.tsx

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)