Skip to content

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

@Tal500

Description

@Tal500

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions