Skip to content

A platform to host player-vs-player programming contests. Imagine classic games like tic-tac-toe, go, and connect-4 turned into coding battles.

Notifications You must be signed in to change notification settings

CodecupHSGS/codecuphsgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codecup HSGS

A platform to host player-vs-player programming contests.

Imagine classic games like tic-tac-toe, go, and connect-4 turning into coding battles.

Screen Shot 2023-12-22 at 7 33 31 am

How it works

Admins create contests by submitting a PDF statement file and a judge file. You can find a sample judge file for the game Connect-4 here.

Screen Shot 2023-12-22 at 7 35 58 am

Users submit their programs. You can find a sample source code for the game Connect-4 here.

Users submit their programs.
The platform sets up pairwise matches and runs these matches to find the programs with the highest scores
It's not just about solving problems; it's about beating your opponent in these games!

Features

  • User registration and authentication
  • User registration and authentication
  • Support easy contest preparation with a platform for running sample matches
  • Screen Shot 2023-12-22 at 7 40 28 am
  • Admins can allow users to run their submissions against each other before the final matchup

To be added

  • Other contest modes: round-16 (16 best programs will be selected to compete for slots in the quarter-final), elimination (the worst program in each round will be eliminated)
  • Match renderer: admins can choose to submit a renderer file when creating contest to help visualise the matches.
  • How to set up

    Using docker images

    Pull and run the docker image for the judge server

    Visit CPP-PvP-judge for more details.

    Pull and run the docker image for the back-end server

    docker pull hoanggiapvuvhg/codecuphsgs_backend
    docker run -e JUDGE_SERVER_URL={URL of the judge server} -e MONGODB_URI={URI of your MongoDB connection} -p {host port}:8000 --mount source={docker volume},target=/usr/src/app/files -p {host port}:5000 hoanggiapvuvhg/codecuphsgs_backend
    

    Pull and run the docker image for the front-end server

    docker pull hoanggiapvuvhg/codecuphsgs_frontend
    docker run -p {host port}:3000 -e BACKEND_URL={URL of your backend server} hoanggiapvuvhg/codecuphsgs_frontend
    

    Build and run a sample server from code

    Build and run the backend server:

    cd backend && 
    npm run build &&
    npm run start
    

    Build and run the front-end server:

    cd Frontend &&
    npm run build &&
    npm run start
    

    Then go to http://localhost:3000/

    Database

    Set up a local MongoDB database: You can import sample user data & contest data or visit the website (http://localhost:3000/) and register users there.

    Import sample user data & contest data:

    You can then log in as an administrator:

    username: admin
    password: a
    

    About

    A platform to host player-vs-player programming contests. Imagine classic games like tic-tac-toe, go, and connect-4 turned into coding battles.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published