Five in a Row (Omok) Game
Check the rules of the game, fill in the following functions, select the opponent, and click the Start Game button to start the battle.
It selects one of the coordinates from (0,0) to (14,14) on the 15x15 coordinate plate and returns it. If you take five consecutive coordinates in one direction of horizontal / vertical / diagonal, you win.
The player who starts the game first starts 1 round and the player who lost in the previous round starts the next round.
If you win 4 rounds out of a total of 6 rounds, you win the game.
Your color is white, and your opponent's color is black.
Code battle is a battle between your code and opponent's code, and the language is JAVASCRIPT.
Fill in the code, select the opponent (RANDOM, LEVEL1, LEVEL2, LEVEL3, Online opponent) and then press the game start button will start the match.
1 game consists of 6 rounds, 1 round will continue until one side wins or all coordinates are occupied.
Code battle's lifecycle callback functions are onGameStart, onRoundStart, onTurnStart, onRoundEnd, onGameEnd, and you have to implement your own logic on each function.
Building a basic strategy of the game, analyzing your opponent's pattern and returning the best choice from onTurnStart is the key to winning.
Opponents: <= If you join here, other users can see you.
The entire game log is displayed in the area below.
If you or the opponent's screen is not visible, the communication speed will be slower.