-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement move recommendation feature and update game configuration
This commit adds the implementation for the move recommendation feature in the Tic-Tac-Toe game. It also includes updates to the game configuration to support this new feature. Changes: - Added "join" to gameState.txt - Added move recommendation logic to recommend.nr - Added recommendedMove.json with a sample recommended move - Updated gameState.json with a sample game state - Updated package.json to include the "lockfile" dependency - Updated index.ejs to display the current turn - Updated style.css to add a new class for winning cells - Added recommend.js to provide move recommendation service - Updated index.js to handle game state saving and recommendation retrieval
- Loading branch information
1 parent
42b6ee4
commit ca47cd9
Showing
11 changed files
with
470 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"gameBoard": [ | ||
"O", | ||
"X", | ||
" ", | ||
" ", | ||
"O", | ||
" ", | ||
"X", | ||
"X", | ||
" " | ||
], | ||
"currentPlayer": "O" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
join |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tumia mtandao | ||
|
||
fanya game = mtandao.peruzi("https://lab.breviamlogistics.co.ke/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"move": 8, | ||
"timestamp": "2024-10-05T01:23:30.083Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.