Skip to content

Commit

Permalink
add note about suboptimal solution for hunyadi step up move
Browse files Browse the repository at this point in the history
  • Loading branch information
czeildi committed Jan 19, 2025
1 parent 36ba750 commit 5eb5a77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export const aiBotStrategy = ({ board, ctx, moves }) => {
const optimalGroupToKill = getOptimalGroupToKill(board);
const { nextBoard, isGameEnd } = moves.killGroup(board, optimalGroupToKill);
if (!isGameEnd) {
// TODO: ideally this is not a player initiated move but something that happens at the
// end of turn by game engine
setTimeout(() => {
moves.stepUp(nextBoard);
}, 750);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const BoardClient = ({ board, ctx, moves }) => {
} else {
const group = board[rowIndex][pieceIndex];
const { nextBoard, isGameEnd } = moves.killGroup(board, group);
// TODO: ideally this is not a player initiated move but something that happens at the
// end of turn by game engine
if (!isGameEnd) {
setTimeout(() => {
moves.stepUp(nextBoard);
Expand Down

0 comments on commit 5eb5a77

Please sign in to comment.