diff --git a/README.md b/README.md index f27e0cb..d65ed4b 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ This is the improved platform for the schnapsen card game. To get to know the concept of the game, please visit [this web page](https://www.pagat.com/marriage/schnaps.html). - -To use the platform, your python version must be at least 3.9, we suggest installing conda an using an environment. +To use the platform, your python version must be at least **3.10**, we suggest installing conda an using an environment. To get started, install the schnapsen package and its dependencies in editable mode by running: @@ -35,12 +34,12 @@ To run the CLI, run: ```sh python executables/cli.py ``` + This will list the available commands. For example, if you want try a RandBot play against another RandBot, type `python executables/cli.py random-game`. - ## Running the GUI The graphical user interface (GUI) lets you play visually against a bot (e.g., You vs. RandBot). @@ -51,49 +50,62 @@ To start the GUI, run: python executables/server.py ``` -Now, open your webbrowser and type in the server address (i.e., http://127.0.0.1:8080). -By default, you are playing against RandBot. You can also play against other bots. Run +Now, open your webbrowser and type in the server address (i.e., http://127.0.0.1:8080). +By default, you are playing against RandBot. You can also play against other bots. Run ```sh python executables/server.py --help ``` + for more details. +## Running the schnapsen python package on Google Colab + +Although the proper way of cloning & installing repos and coding them is to do on your +local machine, we have also provided this Jupyter Notebook for those who can't. +Everything you run here is running on a Google server, not your machine. +So the changes you make here will not stay forever. + +[Click here to open the Colab file](https://gist.github.com/tae898/058eb5c7734024cfc1b14f2f6f6530b8) and click on the button +on top "Open in Colab" to run this Jupyter Notebook on a Google server. + ## Implementing more bots You will find bot examples in the [`src/schnapsen/bots`](./src/schnapsen/bots) folder. You can look at the example_bot.py file for various methods provided to your bot. - ## Troubleshooting -### Getting the right python ### +### Getting the right python The first hurdle in getting the platform to run is getting the right python version on your system. An easy way to get that is using virtual environments. We suggest you install [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) to manage them. Then, you can use conda to create a new environment by running + ```sh conda create --name project_is python=3.10 ``` + With this environment created, you can start it + ``` conda activate project_is ``` + Inside this environment you can install the dependencies as instructed above. -### Run the right python ### +### Run the right python If you install conda and create an environment, you can run python by just running the `python` command. -However, often your system also provides a python version. +However, often your system also provides a python version. To know which python is running, use + ```sh which python # on linux where python # on windows (untested) -``` -Now, you want to look at the output and make sure that this executable is inside the anaconda folder and not where your system stores its executables. - - +``` +Now, you want to look at the output and make sure that this executable is inside the anaconda folder and not where your system stores its executables. -## Documentation ## +## Documentation The code is documented using reStructuredText. You can either read the documentation along the code, or generate a more suer friendly version. A pregenerated version of the documentation can be found int he doc folder. It can be regenerated by runnign the following in the root of the repository. @@ -121,4 +133,3 @@ pdoc --html src/schnapsen executables/ -o doc/ ``` if above doesn't work, try pdoc3, instead of pdoc -