Skip to content

Commit

Permalink
Added exception handling, code cleanup, removed C# version
Browse files Browse the repository at this point in the history
  • Loading branch information
MARKMENTAL committed Jan 14, 2022
1 parent 09eec7a commit cc54057
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 375 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ PyWRBS stands for Python Wrestling Booking Simulator.
It is recommended to use the pylaunch.py script to start the sim.
This was written with Python 3 and imports the random module.
It is best used on Linux or with WSL.
# C# Version
There is also a version included called CSWRBS that is written in C#. It requires the Mono C# compiler to be installed to run from the launcher script.
the following command installs Mono on Ubuntu: "sudo apt install mono-devel".<br><b>I only made this version to familiarize myself with C# language syntax, so it may stop being regularly updated in favor of PyWRBS.</b>

# Screenshot of Latest Version
![image](https://user-images.githubusercontent.com/17995774/149043843-b20f785c-e276-4521-959d-8376348d45ba.png)
Expand Down
238 changes: 0 additions & 238 deletions cswrbs.cs

This file was deleted.

Binary file removed cswrbs.exe
Binary file not shown.
47 changes: 29 additions & 18 deletions pylaunch.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
import os
status = 1
import os
status = 0
print("Launched by pylaunch")
status = int(input("1.Python Version\n2.Python3 Version\n3.C# Version\n"))
try:
status = int(input("1.Python Version\n2.Python3 Version(Suggested for Ubuntu)\n"))
except ValueError:
print("An error occurred, invalid input.\nlauncher shutting down...")
while status != 0:
if status == 1:
os.system("python pywrbs.py")
status = int(input("Press 0 to exit or 1 to keep playing:"))
if status != 1:
try:
status = int(input("Press 0 to exit or 1 to keep playing:\n"))
if status == 1:
status = 1
else:
print("launcher shutting down...")
except ValueError:
print("An error occurred, invalid input...\nlauncher shutting down...")
status = 0
except KeyboardInterrupt:
print("launcher shutting down...")
status = 0

elif status == 2:
os.system("python3 pywrbs.py")
status = int(input("Press 0 to exit or 1 to keep playing:"))
if status != 1:
try:
status = int(input("Press 0 to exit or 1 to keep playing:\n"))
if status == 1:
status = 2
else:
print("launcher shutting down...")
except ValueError:
print("An error occurred, invalid input...\nlauncher shutting down...")
status = 0
elif status == 1:
status = 2

elif status == 3:
os.system("mono cswrbs.exe")
status = int(input("Press 0 to exit or 1 to keep playing:"))
if status != 1:
except KeyboardInterrupt:
print("\nlauncher shutting down...")
status = 0
elif status == 1:
status = 3

else:
status = 0
print("Exiting...")
status = 0
print("launcher shutting down...")
Loading

0 comments on commit cc54057

Please sign in to comment.