Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch the game to human vs human mode in local #2

Open
abcwang12 opened this issue Apr 14, 2024 · 2 comments
Open

switch the game to human vs human mode in local #2

abcwang12 opened this issue Apr 14, 2024 · 2 comments

Comments

@abcwang12
Copy link

Hello, I find your implementation very impressive. I want to ask if there is any way to switch to the 2-player version on the local computer (meaning the game is now human vs human, not human vs AI anymore). Thankss!!!!

@gorisanson
Copy link
Owner

@abcwang12

Screenshot from 2024-04-14 22-26-40

I think you can use "AI Develop Mode". In the AI Develop Mode, you can use "AI do" button if you want AI to play a ply at a specific point. If you never click a "AI do" button, it works like a 2-player version. To turn on the AI Develop Mode, you can follow the guide below:

quoridor-ai/src/index.html

Lines 520 to 543 in d8062fa

/*
****************************************
** How to use AI Develop Mode **
****************************************
*
* If you want to use aiDevelopMode, use Chrome DevTools.
* It needs three steps.
*
* 1.
* In "Local Overrides" (Sources -> Overrides),
* (see https://developers.google.com/web/updates/2018/01/devtools#overrides)
* Edit the line below this comment to "const aiDevelopMode = true;".
*
* 2.
* Unregister the current service worker in "Service Workers" (Application -> Service Workers).
* (see https://stackoverflow.com/a/41907900)
*
* 3.
* Finally, Reload the page.
*
* Welcome to AI Develop Mode!
*/
const aiDevelopMode = false;

@abcwang12
Copy link
Author

Oh, Thank you so much for this guidance. I really appreciate it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants