-
Notifications
You must be signed in to change notification settings - Fork 2
/
kozajudge.py
40 lines (31 loc) · 2.03 KB
/
kozajudge.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import sys
import TestFile
def startJudging(exercise: str):
file = TestFile.Test(exercise)
file.testExercise()
def startProgram(ex="") -> None:
print("""
██╗░░██╗░█████╗░███████╗░█████╗░░░░░░██╗██╗░░░██╗██████╗░░██████╗░███████╗
██║░██╔╝██╔══██╗╚════██║██╔══██╗░░░░░██║██║░░░██║██╔══██╗██╔════╝░██╔════╝
█████═╝░██║░░██║░░███╔═╝███████║░░░░░██║██║░░░██║██║░░██║██║░░██╗░█████╗░░
██╔═██╗░██║░░██║██╔══╝░░██╔══██║██╗░░██║██║░░░██║██║░░██║██║░░╚██╗██╔══╝░░
██║░╚██╗╚█████╔╝███████╗██║░░██║╚█████╔╝╚██████╔╝██████╔╝╚██████╔╝███████╗
╚═╝░░╚═╝░╚════╝░╚══════╝╚═╝░░╚═╝░╚════╝░░╚═════╝░╚═════╝░░╚═════╝░╚══════╝\n""")
if ex == "":
file = input("Welcome to KozaJudge!\nPlease insert the name of the exercise: ")
else:
file = ex
if os.path.exists(os.getcwd() + "/Testcases"):
if os.path.exists(os.getcwd() + "/Exercises"):
startJudging(file)
else:
print("Exercises not found. Please check the folders")
else:
print("Testcases were not found. Please check the folders")
def main() -> None:
if len(sys.argv) > 1:
startProgram(sys.argv[1])
else:
startProgram()
main()