added german documentation to seeding and double elimination api/ gamestate

This commit is contained in:
Joel Klimont 2022-11-09 03:25:27 +01:00
parent de9b671f29
commit 369692b619
8 changed files with 107 additions and 24 deletions

View file

@ -22,6 +22,7 @@ os.environ["EXTENSIVE_LOGGING"] = "False"
project = 'CompLib'
copyright = '2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)'
author = 'robo4you'
autoclass_content = 'both'
# The full version, including alpha/beta/rc tags
release = '0.2.3'

View file

@ -0,0 +1,13 @@
.. _lib_doubleElim:
Double Elimination
*******************
Dokumentation des Double Elimination Moduls
============================================
.. autoclass:: compLib.DoubleElimination.Position
:members:
.. autoclass:: compLib.DoubleElimination.DoubleElim
:members:

View file

@ -0,0 +1,36 @@
.. _lib_seeding:
Seeding
*******
Dokumentation des Seeding Moduls
================================
.. autoclass:: compLib.Seeding.Gamestate
:members:
Beispiele
----------
| In ``Zeile 1`` wird das Seeding Modul importiert.
| In ``Zeile 2`` definieren wir dann eine Variable, in der wir den "Seed" des Gamestates den wir erstellen wollten speichern.
| In ``Zeile 3`` erstellen wir dann einen neuen Gamestate mit dem Seed und speichern ihn in die Variable ``gamestate``.
| In ``Zeile 4`` geben wir dann den Gamestate aus, damit wir ihn auf der Konsole ansehen können.
.. code-block:: python
import compLib.Seeding as Seeding
seed = 42
gamestate = Seeding.Gamestate(seed)
print(gamestate)
In der Ausgabe des Print Statements sehen wir den generierten Gamestate.
.. code-block::
Seed: 42
Heu Color: 1
Material Pairs: [[3, 0], [2, 3], [0, 2], [1, 2]]
Material Zones: [2, 1, 3, 2]
Logistic Plan: [12, 13, 12, 13, 10, 11, 13, 10, 13, 12, 11, 10, 11, 13, 10, 11, 12, 11, 12, 10, 12]
Logistic Centers: [[0, 3, 1, 1], [1, 0, 2, 2], [1, 2, 0, 2], [3, 0, 2, 0]]

View file

@ -3,6 +3,9 @@ compLib
.. toctree::
:maxdepth: 5
:glob:
classes/*
classes/Motor
classes/Encoder
classes/IRSensor
classes/Seeding
classes/DoubleElimination