Skip to content

Judge server for the codecuphsgs project.

Notifications You must be signed in to change notification settings

CodecupHSGS/cpp-pvpjudge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp-pvpjudge

About

A judge server to run epic PvP coding matches!

Overview

The server receives matches via POST requests containing a judge file and two player's source codes, named judge.cpp, player1.cpp, and player2.cpp.

Users can then get the match results and the game log via GET requests. Note that the server will remove the results once the requests are finished.

Currently, the server only supports .cpp files; there will be support for Python files in the future.

How to run the server

Step 1: Pull the image hoanggiapvuvhg/cpp-pvp-judge from Dockerhub. On Ubuntu:

sudo docker pull hoanggiapvuvhg/cpp-pvp-judge

Step 2: Run the server:

sudo docker run -p ${whatever-port-you-want}:9000 hoanggiapvuvhg/cpp-pvp-judge

Step 3: Send a POST request with the files!

Sample request with postman:

Screen Shot 2023-09-24 at 2 29 46 am

You will get a submission ID from the response:

Screen Shot 2023-09-24 at 2 32 28 am

Step 4: Get the match's result

Get on the browser and enter the following links.

http://127.0.0.1:${whatever-port-you-want}/log/{submission-ID}
http://127.0.0.1:${whatever-port-you-want}/results/{submission-ID}
Screen Shot 2023-09-24 at 2 36 24 am

About

Judge server for the codecuphsgs project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published