A Game-Interface for a JavaScript Workshop that I conducted
-
Choose which player goes first by clicking on the switch icon you can find left to the game board. The player that has to set his figure on the board is marked by a dark background in the icon.
-
Now each player can set their figure on the board, each taking turns doing so.
-
If there is a winner, the icon background in the switch changes its background-color to green.
Here you can see the interface. Player "x" chose to start in this round of the game.
Player "x" set the figure, now the active player switched. Player "o" is taking turns.
Player "x" is one move away from winning this round.
Player "x" won this round. You can see that the switches' background-color changed to green. To start the next round, press the restart button in the menu right to the board.
- Undo button: removes the last move a player made (Each player can undo a move for upto 3 seconds, after that the players turn is over)
- Help finding the optimal move (Implementation of the Min-Max-Search to find the next optimal move for you)
- Database (Keeping track of game history)
- Leaderboard (Track names of the players in each round, possibility to conduct local tournaments)