forked from acm-ndsu/byte_le_engine
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation to server config + main (#148)
* Added documentation for server config and the main server file * Made requested documentation updates
- Loading branch information
1 parent
5b1d24a
commit 47740f9
Showing
4 changed files
with
171 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,77 @@ | ||
|
||
|
||
class Config: | ||
""" | ||
Config | ||
------ | ||
The Server Config class is responsible for setting up the runners for the server. | ||
----- | ||
Number Of Games Against Same Team | ||
+++++++++++++++++++++++++++++++++ | ||
The Number Of Games Against Same Team is an int representing how many runs should be repeated. It is worth | ||
noting that this should be 1 if the development team has ensured that randomness is seeded, ensuring that | ||
two games with the same seed play out the same way. Competitor randomness is their own liability and not | ||
the development team's responsibility. | ||
----- | ||
Sleep Time Between Runs | ||
+++++++++++++++++++++++ | ||
The Sleep Time Between Runs is an int representing the number of seconds between each run of the client runner. | ||
Each time the client runner is run, it will generate an entire tournament. The run time of the client runner is | ||
not factored into this time. | ||
----- | ||
End DateTime | ||
++++++++++++ | ||
The End DateTime is an ISO formatted string representing the end of the competition. This will need to be | ||
changed for every competition. Ex. 'YYYY-mm-dd HH:MM', like '2030-01-01 00:00' | ||
----- | ||
Sleep Time Between Vis | ||
++++++++++++++++++++++ | ||
The Sleep Time Between Vis is an int representing the number of seconds between each run of the visualizer. | ||
Each time the visualizer is run, it will visualize the best runs for each team of the tournament. The run time | ||
of the visualizer is not factored into this time. If the visualizer isn't running on the server, increase this | ||
parameter as a potential solution. | ||
----- | ||
""" | ||
__NUMBER_OF_GAMES_AGAINST_SAME_TEAM: int = 1 | ||
__SLEEP_TIME_SECONDS_BETWEEN_RUNS: int = 150 | ||
__END_DATETIME: str = "2030-01-01 00:00" # Adjust this for every competition!!!!! | ||
__SLEEP_TIME_SECONDS_BETWEEN_VIS: int = 10 | ||
|
||
@property | ||
def NUMBER_OF_GAMES_AGAINST_SAME_TEAM(self) -> int: | ||
""" | ||
The Number Of Games Against Same Team is an int representing how many runs should be repeated. It is worth | ||
noting that this should be 1 if the development team has ensured that randomness is seeded, ensuring that | ||
two games with the same seed play out the same way. Competitor randomness is their own liability and not | ||
the development team's responsibility. | ||
:return: int | ||
""" | ||
return self.__NUMBER_OF_GAMES_AGAINST_SAME_TEAM | ||
|
||
@property | ||
def SLEEP_TIME_SECONDS_BETWEEN_RUNS(self) -> int: | ||
""" | ||
The Sleep Time Between Runs is an int representing the number of seconds between each run of the client runner. | ||
Each time the client runner is run, it will generate an entire tournament. The run time of the client runner is | ||
not factored into this time. | ||
:return: int | ||
""" | ||
return self.__SLEEP_TIME_SECONDS_BETWEEN_RUNS | ||
|
||
@property | ||
def END_DATETIME(self) -> str: | ||
""" | ||
The End DateTime is an ISO formatted string representing the end of the competition. This will need to be | ||
changed for every competition. | ||
:return: str | ||
""" | ||
return self.__END_DATETIME | ||
|
||
@property | ||
def SLEEP_TIME_SECONDS_BETWEEN_VIS(self) -> int: | ||
""" | ||
The Sleep Time Between Vis is an int representing the number of seconds between each run of the visualizer. | ||
Each time the visualizer is run, it will visualize the best runs for each team of the tournament. The run time | ||
of the visualizer is not factored into this time. If the visualizer isn't running on the server, increase this | ||
parameter as a potential solution. | ||
:return: int | ||
""" | ||
return self.__SLEEP_TIME_SECONDS_BETWEEN_VIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters