Sign inSign up

soprateamzehn/ki

By soprateamzehn

•Updated about 7 years ago

KI

Image
0

958

soprateamzehn/ki repository overview

Build Status

⁠KI

KI-Client for the Quidditch Game.

⁠Usage

In accordance to the standard, it is possible to change some options of the ki-client using command line arguments. For the application the following flags exist:

  • -a/--address set the address (ip or url) of the server (mandatory)
  • -t/--team set the path to the TeamConfig JSON file (mandatory)
  • -l/--lobby set the name of the lobby to join (optional, the default is hogwarts)
  • -u/--username set the name of the player (optional, the default is Team10Ki)
  • -k/--password set the password used by the ki (optional, the default is password)
  • -h/--help show the help dialog and exit (optional)
  • -p/--portset the port (the port needs to be larger 0 and smaller 65536) (optional, the default value is 4488)
  • -d/--difficultyset the difficulty of the KI (optional, the default 0)
  • -v/--verbosity change the verbosity level, for more information on log-levels see SoPra-Team-10/Util⁠ (optional, the default value is 0)

⁠Getting started

You can choose between using Docker or manually installing all dependencies. Docker is the preferred method as it already installs the toolchain and all dependencies.

⁠Docker
⁠Prebuild Docker Image

Get a prebuild Docker Image here⁠ or run:

docker pull soprateamzehn/ki
⁠Build your own Docker Image from the provided Dockerfile

In the root directory of the project build the docker image ("ki" is the name of the container, this can be replaced by a different name):

docker build -t ki .

Now start the container, you need to map the internal port (8080 by default, to some external port 80 in this case) and map the external file (match.json) to an internal file:

docker run -t ki ./build/KI -a ADDRESS -p PORT -t teamConfig.json -l LOBBY -u USERNAME -k PASSWD -v 4

That's it you should now have a running docker instance.

⁠Manually installing the KI-Client

If you need to debug the ki it can be easier to do this outside of docker.

⁠Prerequisites
⁠Compiling the Application

In the root directory of the project create a new directory (in this example it will be called build), change in this directory.

Next generate a makefile using cmake:

cmake ..

if any error occurs recheck the prerequisites. Next compile the program:

make

you can now run the ki by executing the created KI file:

./KI

⁠Log-Levels

Log-LevelColorExplanation
0-No log messages
1RedOnly error messages
2YellowError messages and warning
3BlueError messages, warning and info messages
4WhiteAll messages (error, warning, info and debug)

⁠External Librarys

⁠Doxygen Dokumentation

⁠SonarQube Analyse

Das Analyseergebniss von SonarQube ist hier auf SonarCloud⁠ zu finden.

Tag summary

Content type

Image

Digest

Size

259.1 MB

Last updated

about 7 years ago

docker pull soprateamzehn/ki