1:1 Fighting Tournament
Code Battle
한글로 보기

Game Rules

This match is a 1:1 match between Player 1 and Player 2's code, and the programming language is JAVASCRIPT.
Attack: punch(1), kick(2)
Target: head(1), body(2), leg(3)
Best of 5 rounds
1 Round = 200 Turns

After checking the game rules, writing the codes for Player 1 and Player 2, click the Start Game button to start the match.

Code battle's lifecycle callback functions are onGameStart, onRoundStart, onTurnStart, onTurnEnd, onRoundEnd, onGameEnd.

Scoring rules:

  • The success or failure of head, body, and leg attacks is the same as rock-paper-scissors rule.
  • Punch(1): head 4pts, body 3pts, leg 2pts
  • Kick(2): head 6pts, body 5pts, leg 4pts
  • If hitting areas are same, punch(1) wins kick(2).

Building a basic strategy, analyzing your opponent's pattern and returning the best choice at onTurnStart is the key to winning.

The screen since the round of 16 →

Player 1

Player 2

TURN
Player 1
0
Player 2
0
ROUND
Player 1
0
Player 2
0
GAME
Player 1
0
Player 2
0

Game Log

Recent logs are displayed at the top.