Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Help code a Simulation of Tournament. (Language=TBA)

Hello, I would like to simulate a tournament with double elimination. I've seen people simulate things in python but I don't really know where to start. I am only going to use it for myself, I don't need to put it online anywhere.

 

Do you have a suggestion to what code language to use for this? And If the answer is python, how do you run a "server" to test/run the python code locally on a computer?

Link to post
Share on other sites

Language doesn't really matter Just stick to a popular one so you can find help online, python is a good one.

You can just download python from it's official website: https://www.python.org/downloads/

It comes with a basic IDE (text editor)  where you can write code. It you want something more fancy you can use VS code or PyCharm or whatever you like.

 

ಠ_ಠ  if i said something stupid please let me know

Link to post
Share on other sites

Thanks for the advice. I just did write it in javascript with output to a html document. that way I dont need a local server running. And Im getting used to javascript.

Link to post
Share on other sites

You don't need a "server" which is defined as anything that binds to and listen on a network socket pretty much. Not every program needs to do that. 

 

Html with inline javascript is indeed a good choice. Weirdly enough, html/css/js is the easiest way to code up pretty looking gui. Doing things with gui frameworks like tkinter and pyqt in pythons is a lot more tedious. 

Sudo make me a sandwich 

Link to post
Share on other sites

And it's also easier to share your work if you do it with javascript. Go with it then.

 

The rules for the double elimination system are more complex than i thought, so maybe start out with a single elimination tournament with power of 2 number of teams, then try to figure out how to do it with any number of teams before you start to think about the loser bracket.

ಠ_ಠ  if i said something stupid please let me know

Link to post
Share on other sites
6 hours ago, Kimmaz said:

I dont need a local server running.

To clear this up. As @wasab said you don't need a server, what you need is an interpreter. In simple terms this is a program which can read python code, it can parse it and do all the calculations stated in the python code. In case of javascript this interpreter is your browser. The beauty of this approach is that the same code can run on different platforms and systems (with little to no additional work).

ಠ_ಠ  if i said something stupid please let me know

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×