Skip to content

Contest Instances

Hunter Han edited this page Nov 7, 2021 · 1 revision

Contest instances are required to load up a contest. PC^2 manages competitions with profiles. Once you create a contest with the pc^2 software, a new folder called profiles appears in the bin folder. This files stores important information such as user accounts, problem data, etc.

ContestInstance contest = new ContestInstance(<path to your bin folder in your pc^2 folder>, <set this to true, only set to false if you really want to create a new profile and override the old profiles.properties>, <contest password>); // Initialize the contest instance
contest.startDataViewing(); // Open the contest and start operations
System.exit(0); // Terminating the server and the program

Methods in Contest Instance

startDataViewing()

Simulates the startup of the PC^2 server. This method is required before all other contest modifications!

Clone this wiki locally