212 lines
No EOL
13 KiB
HTML
212 lines
No EOL
13 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="de" >
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Double Elimination — CompLib 0.2.3 Dokumentation</title><link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
|
||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||
<!--[if lt IE 9]>
|
||
<script src="../../_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||
<script src="../../_static/jquery.js"></script>
|
||
<script src="../../_static/underscore.js"></script>
|
||
<script src="../../_static/doctools.js"></script>
|
||
<script src="../../_static/translations.js"></script>
|
||
<script src="../../_static/js/theme.js"></script>
|
||
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
|
||
<link rel="search" title="Suche" href="../../search.html" />
|
||
<link rel="next" title="Camera und OpenCV" href="Opencv.html" />
|
||
<link rel="prev" title="Seeding" href="Seeding.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
<a href="../../index.html"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
|
||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../faq.html">FAQ</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../other/usage.html">Beispiele</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">compLib</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="Motor.html">Motoren</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Encoder.html">Encoder</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="IRSensor.html">Infrarot Sensoren</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Seeding.html">Seeding</a></li>
|
||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Double Elimination</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-des-double-elimination-moduls">Dokumentation des Double Elimination Moduls</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Opencv.html">Camera und OpenCV</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="../../index.html">CompLib</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="../../index.html" class="icon icon-home"></a> »</li>
|
||
<li><a href="../index.html">compLib</a> »</li>
|
||
<li>Double Elimination</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<a href="../../_sources/lib/classes/DoubleElimination.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<div class="section" id="double-elimination">
|
||
<span id="lib-doubleelim"></span><h1>Double Elimination<a class="headerlink" href="#double-elimination" title="Link zu dieser Überschrift"></a></h1>
|
||
<div class="section" id="dokumentation-des-double-elimination-moduls">
|
||
<h2>Dokumentation des Double Elimination Moduls<a class="headerlink" href="#dokumentation-des-double-elimination-moduls" title="Link zu dieser Überschrift"></a></h2>
|
||
<dl class="py class">
|
||
<dt id="compLib.DoubleElimination.Position">
|
||
<em class="property">class </em><code class="sig-prename descclassname">compLib.DoubleElimination.</code><code class="sig-name descname">Position</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em>, <em class="sig-param"><span class="n">degrees</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.DoubleElimination.Position" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Datenstruktur, welche eine Position representiert.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Variablen</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – X Position in Centimeter</p></li>
|
||
<li><p><strong>y</strong> – Y Position in Centimeter</p></li>
|
||
<li><p><strong>degrees</strong> – Rotation in Grad von -180 bis 180</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt id="compLib.DoubleElimination.DoubleElim">
|
||
<em class="property">class </em><code class="sig-prename descclassname">compLib.DoubleElimination.</code><code class="sig-name descname">DoubleElim</code><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Klasse für die Kommunikation mit Double Elimination Api</p>
|
||
<dl class="py method">
|
||
<dt id="compLib.DoubleElimination.DoubleElim.get_goal">
|
||
<em class="property">static </em><code class="sig-name descname">get_goal</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Tuple<span class="p">[</span><a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">compLib.DoubleElimination.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_goal" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Führt den /api/getGoal Aufruf an die API aus.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Rückgabe</dt>
|
||
<dd class="field-odd"><p>Ein Objekt der Klasse <a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position"><code class="xref py py-class docutils literal notranslate"><span class="pre">Position</span></code></a> mit der Position des Ziels relativ zum eigenen Roboter und der Status Code</p>
|
||
</dd>
|
||
<dt class="field-even">Rückgabetyp</dt>
|
||
<dd class="field-even"><p>Tuple[<a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">Position</a>, int]</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="compLib.DoubleElimination.DoubleElim.get_items">
|
||
<em class="property">static </em><code class="sig-name descname">get_items</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Tuple<span class="p">[</span>List<span class="p">[</span>Dict<span class="p">]</span><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_items" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Führt den /api/getItems Aufruf an die API aus.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Rückgabe</dt>
|
||
<dd class="field-odd"><p>Eine Liste aller Items, die sich derzeit auf dem Spielfeld befinden. Items sind „dictionaries“, die wie folgt aussehen: {„id“: 0, „x“: 0, „y“: 0}</p>
|
||
</dd>
|
||
<dt class="field-even">Rückgabetyp</dt>
|
||
<dd class="field-even"><p>Tuple[List[Dict], int]</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="compLib.DoubleElimination.DoubleElim.get_opponent">
|
||
<em class="property">static </em><code class="sig-name descname">get_opponent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Tuple<span class="p">[</span><a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">compLib.DoubleElimination.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_opponent" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Führt den /api/getOp Aufruf an die API aus.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Rückgabe</dt>
|
||
<dd class="field-odd"><p>Ein Objekt der Klasse <a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position"><code class="xref py py-class docutils literal notranslate"><span class="pre">Position</span></code></a> mit der Position des gegnerischen Roboters relativ zum eigenen Roboter und der Status Code</p>
|
||
</dd>
|
||
<dt class="field-even">Rückgabetyp</dt>
|
||
<dd class="field-even"><p>Tuple[<a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">Position</a>, int]</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="compLib.DoubleElimination.DoubleElim.get_pos">
|
||
<em class="property">static </em><code class="sig-name descname">get_pos</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Tuple<span class="p">[</span><a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">compLib.DoubleElimination.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_pos" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Führt den /api/getPos Aufruf an die API aus.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Rückgabe</dt>
|
||
<dd class="field-odd"><p>Ein Objekt der Klasse <a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position"><code class="xref py py-class docutils literal notranslate"><span class="pre">Position</span></code></a> mit der Position des Roboters und der Status Code</p>
|
||
</dd>
|
||
<dt class="field-even">Rückgabetyp</dt>
|
||
<dd class="field-even"><p>Tuple[<a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">Position</a>, int]</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="compLib.DoubleElimination.DoubleElim.get_scores">
|
||
<em class="property">static </em><code class="sig-name descname">get_scores</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_scores" title="Link zu dieser Definition"></a></dt>
|
||
<dd><p>Führt den /api/getScores Aufruf an die API aus.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Rückgabe</dt>
|
||
<dd class="field-odd"><p>Ein „dictionary“ mit dem eignen Score und dem des Gegners: {„self“:2,“opponent“:0}</p>
|
||
</dd>
|
||
<dt class="field-even">Rückgabetyp</dt>
|
||
<dd class="field-even"><p>Tuple[Dict, int]</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="Seeding.html" class="btn btn-neutral float-left" title="Seeding" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
|
||
<a href="Opencv.html" class="btn btn-neutral float-right" title="Camera und OpenCV" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
|
||
</div>
|
||
|
||
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |