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

Add a simple AJAX based Tic-Tac-Toe example #25

Open
Tal500 opened this issue Sep 13, 2021 · 0 comments
Open

Add a simple AJAX based Tic-Tac-Toe example #25

Tal500 opened this issue Sep 13, 2021 · 0 comments

Comments

@Tal500
Copy link
Owner

Tal500 commented Sep 13, 2021

We need an example of updating reactive variables based on AJAX response.

A great example is to have a Tic-Tac-Toe bot in the server, which act as a computer opponent which play its move after each user move, until the event of Win/Lose/Tie (which the bot reports also).

The answer of the bot should be based on AJAX, and it should update the reactive variable that hold the state of the game.

The UI should show the board, together with a status message of one of the follows:

  • Your Move
  • Waiting for Server Response...
  • You Won!
  • You Lost...
  • It's a Tie!

The server should save the session somehow in-memory(we don't want to have DB in the example), so the state is kept while refreshing, but should then also have a reset button.

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

1 participant