<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www.spielend-programmieren.at/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>spielend-programmieren</title>
        <description></description>
        <link>http://www.spielend-programmieren.at/wiki/</link>
        <lastBuildDate>Wed, 10 Mar 2010 09:00:36 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>http://www.spielend-programmieren.at/wiki/lib/images/favicon.ico</url>
            <title>spielend-programmieren</title>
            <link>http://www.spielend-programmieren.at/wiki/</link>
        </image>
        <item>
            <title>Mampfi</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:mampfi</link>
            <description>


&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Mampfi entstand aus dem Bonusspiel von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:monkeydoener&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:games:monkeydoener&quot;&gt;MonkeyDöner&lt;/a&gt; und wird von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:teresa:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:teresa:start&quot;&gt;Teresa&lt;/a&gt; programmiert.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Mampfi&quot; [1-163] --&gt;
&lt;h4&gt;&lt;a name=&quot;video&quot; id=&quot;video&quot;&gt;Video&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;!--[if !IE]&gt; --&gt;
&lt;object width=&quot;520&quot; height=&quot;406&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;http://www.youtube.com/v/QIfAT9cI6kM&quot; &gt;
&lt;!-- &lt;![endif]--&gt;
&lt;!--[if IE]&gt;
&lt;object width=&quot;520&quot; height=&quot;406&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; &gt;
    &lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/QIfAT9cI6kM&quot; /&gt;
&lt;!--&gt;&lt;!-- --&gt;
  &lt;param name=&quot;FlashVars&quot; value=&quot;&quot; /&gt;
Das &lt;a href=&quot;http://www.adobe.com/products/flashplayer/&quot;&gt;Adobe Flash Plugin&lt;/a&gt; wird benötigt, um diesen Ihnalt anzuzeigen.
&lt;/object&gt;
&lt;!-- &lt;![endif]--&gt;

&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Video&quot; [164-208] --&gt;
&lt;h4&gt;&lt;a name=&quot;download&quot; id=&quot;download&quot;&gt;Download&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:games:mampfi3.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;de:games:mampfi3.zip&quot;&gt;mampfi3.zip&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:games:readme.pdf&quot; class=&quot;media mediafile mf_pdf&quot; target=&quot;_parent&quot; title=&quot;de:games:readme.pdf&quot;&gt;readme.pdf&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:games:readme.odt&quot; class=&quot;media mediafile mf_odt&quot; target=&quot;_parent&quot; title=&quot;de:games:readme.odt&quot;&gt;readme.odt&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Download&quot; [209-318] --&gt;
&lt;h4&gt;&lt;a name=&quot;installation&quot; id=&quot;installation&quot;&gt;Installation&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;

Python2.6 und pygame1.8 (oder besser) müssen richtig installiert sein damit das Spiel funktioniert.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Installation&quot; [319-442] --&gt;
&lt;h4&gt;&lt;a name=&quot;anleitung&quot; id=&quot;anleitung&quot;&gt;Anleitung&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
Den Spieler steuert den Zauberer mit den Pfeiltasten  &lt;kbd&gt;←&lt;/kbd&gt;, &lt;kbd&gt;→&lt;/kbd&gt;, &lt;kbd&gt;↑&lt;/kbd&gt;, &lt;kbd&gt;↓&lt;/kbd&gt; und legt gesunde Nahrung mit den Tasten &lt;kbd&gt;A&lt;/kbd&gt;, &lt;kbd&gt;S&lt;/kbd&gt;, &lt;kbd&gt;D&lt;/kbd&gt;, &lt;kbd&gt;F&lt;/kbd&gt;.
Man muss herausfinden, welches Kind welches Gemüse oder Obst isst.
Die 4 &lt;a href=&quot;http://www.flickr.com/photos/horstjens/sets/72157623326268356/&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.flickr.com/photos/horstjens/sets/72157623326268356/&quot;  rel=&quot;nofollow&quot;&gt;coolen Kinder&lt;/a&gt; ( &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:markus:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:markus:start&quot;&gt;Markus&lt;/a&gt;, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:raphael:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:raphael:start&quot;&gt;Raphael&lt;/a&gt;, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:mira:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:mira:start&quot;&gt;Mira&lt;/a&gt;, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:teresa:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:teresa:start&quot;&gt;Teresa&lt;/a&gt;) bewerfen den Spieler mit Hamburgers und Pommfrits, denen der Spieler ausweichen muss.
&lt;/p&gt;

&lt;p&gt;
Spielziel:
&lt;/p&gt;

&lt;p&gt;
Die 4 Kinder verlieren Hitpoints &lt;sup&gt;&lt;a href=&quot;#fn__1&quot; name=&quot;fnt__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; wenn sie an der Wand abprallen. Hat ein Kind genug gesunde Nahrung gegessen fährt es von selbst zur Zielposition - wenn alle 4 Kinder dort angelangt sind hat der Spieler gewonnen. Der Spieler verliert wenn er selbst oder ein Kind alle Hitpoints verliert.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Anleitung&quot; [443-1451] --&gt;
&lt;h4&gt;&lt;a name=&quot;screenshots&quot; id=&quot;screenshots&quot;&gt;Screenshots&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/detail.php?id=de%3Agames%3Amampfi&amp;amp;media=de:games:mampfi800.jpg&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:games:mampfi800.jpg&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=400&amp;amp;media=de:games:mampfi800.jpg&quot; class=&quot;mediacenter&quot; title=&quot;Screenshot vom Spiel Mampfi&quot; alt=&quot;Screenshot vom Spiel Mampfi&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Screenshots&quot; [1452-] --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; name=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
Lebenspunkte, symbolisiert durch den grünen Balken. Je grüner, desto gesünder&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>Horst JENS</author>
        <category>de:games</category>
            <pubDate>Tue, 09 Mar 2010 13:00:39 +0100</pubDate>
        </item>
        <item>
            <title>Spiele</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:start</link>
            <description>


&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/detail.php?id=de%3Agames%3Astart&amp;amp;media=games:schiffspieler.jpg&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;games:schiffspieler.jpg&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=300&amp;amp;media=games:schiffspieler.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; alt=&quot;&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;

&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Spiele&quot; [1-57] --&gt;
&lt;h2&gt;&lt;a name=&quot;python_game_book_-_spiele&quot; id=&quot;python_game_book_-_spiele&quot;&gt;Python Game Book - Spiele&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Einige Spiele sind Teil meines &lt;a href=&quot;http://www.pythongamebook.com&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.pythongamebook.com&quot;  rel=&quot;nofollow&quot;&gt;Python Game Book&lt;/a&gt; - Projekts und hier zu finden:

&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/pythongamebook/doku.php?id=en:resources:games:start&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.spielend-programmieren.at/pythongamebook/doku.php?id=en:resources:games:start&quot;  rel=&quot;nofollow&quot;&gt;Python Game Book Spiele&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

Bild rechts: Kursteilnehmer beim austesten des pygame-spieles &lt;a href=&quot;http://www.spielend-programmieren.at/pythongamebook/doku.php?id=en:resources:games:schiff&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.spielend-programmieren.at/pythongamebook/doku.php?id=en:resources:games:schiff&quot;  rel=&quot;nofollow&quot;&gt;Schiff&lt;/a&gt; (4 Spieler-Modus, eine Tastatur)

&lt;/p&gt;
&lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Python Game Book - Spiele&quot; [58-544] --&gt;
&lt;h1&gt;&lt;a name=&quot;spiele_von_kursteilnehmerinnen&quot; id=&quot;spiele_von_kursteilnehmerinnen&quot;&gt;Spiele von KursteilnehmerInnen&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Spiele von KursteilnehmerInnen&quot; [545-592] --&gt;
&lt;h2&gt;&lt;a name=&quot;turtle-grafik&quot; id=&quot;turtle-grafik&quot;&gt;Turtle-Grafik&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

mit dem Turtle Modul von Python werden grundlegende Programmierkonzepte veranschaulicht und erste Computergrafiken erzeugt. Siehe den Abschnitt &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:code:turtle:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:code:turtle:start&quot;&gt;Turtle&lt;/a&gt; im Bereich &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:code:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:code:start&quot;&gt;code&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:can:start&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:personen:can:start&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;h=100&amp;amp;media=personen:can:can7.png&quot; class=&quot;media&quot; title=&quot;Bildschirmschoner von Can&quot; alt=&quot;Bildschirmschoner von Can&quot; width=&quot;150&quot; height=&quot;100&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:code:turtle:bildschirmschoner&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:code:turtle:bildschirmschoner&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;h=100&amp;amp;media=personen:can:code:bildschirmschoner3.png&quot; class=&quot;media&quot; title=&quot;Bildschirmschoner von Can&quot; alt=&quot;Bildschirmschoner von Can&quot; width=&quot;150&quot; height=&quot;100&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:code:turtle:bildschirmschoner&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:code:turtle:bildschirmschoner&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;h=100&amp;amp;media=personen:can:code:bildschirmfoto.png&quot; class=&quot;media&quot; title=&quot;Bildschirmschoner von Can&quot; alt=&quot;Bildschirmschoner von Can&quot; width=&quot;150&quot; height=&quot;100&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:kevin:start&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:personen:kevin:start&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;h=100&amp;amp;media=personen:kevin:bildschirmfoto-1.png&quot; class=&quot;media&quot; title=&quot;Spagettimonster von Kevin&quot; alt=&quot;Spagettimonster von Kevin&quot; width=&quot;150&quot; height=&quot;100&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Turtle-Grafik&quot; [593-1252] --&gt;
&lt;h2&gt;&lt;a name=&quot;python_pygame_spiele&quot; id=&quot;python_pygame_spiele&quot;&gt;Python / Pygame Spiele&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Kursteilnehmer speichern ihre mit &lt;a href=&quot;http://de.wikipedia.org/wiki/Python_(Programmiersprache)&quot; class=&quot;interwiki iw_wpde&quot; target=&quot;_parent&quot; title=&quot;http://de.wikipedia.org/wiki/Python_(Programmiersprache)&quot;&gt;Python_(Programmiersprache)&lt;/a&gt; und &lt;a href=&quot;http://en.wikipedia.org/wiki/pygame&quot; class=&quot;interwiki iw_wp&quot; target=&quot;_parent&quot; title=&quot;http://en.wikipedia.org/wiki/pygame&quot;&gt;pygame&lt;/a&gt; programmierten Spiele überlicherweise innerhalb ihrer &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:start&quot;&gt;persönlichen Wikiseiten&lt;/a&gt; ab.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Python / Pygame Spiele&quot; [1253-1484] --&gt;
&lt;h3&gt;&lt;a name=&quot;mampfi&quot; id=&quot;mampfi&quot;&gt;mampfi&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:mampfi&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:games:mampfi&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;media=de:games:mampfi800.jpg&quot; class=&quot;medialeft&quot; align=&quot;left&quot; title=&quot;Screenshot von mampfi&quot; alt=&quot;Screenshot von mampfi&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:mampfi&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:games:mampfi&quot;&gt;Mampfi&lt;/a&gt;, eine Weiterentwicklung des Bonusspiels aus &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:monkeydoener&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:games:monkeydoener&quot;&gt;Monekydoer&lt;/a&gt; von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:teresa:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:teresa:start&quot;&gt;Teresa&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;mampfi&quot; [1485-1727] --&gt;
&lt;h3&gt;&lt;a name=&quot;monkeydoener&quot; id=&quot;monkeydoener&quot;&gt;monkeydöner&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:monkeydoener&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:games:monkeydoener&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;media=de:games:coolekids.jpg&quot; class=&quot;medialeft&quot; align=&quot;left&quot; title=&quot;Credit Screen von Dönerhaus&quot; alt=&quot;Credit Screen von Dönerhaus&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:games:monkeydoener&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:games:monkeydoener&quot;&gt;Monekydoer&lt;/a&gt; (vormals Dönerhaus) von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:mira:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:mira:start&quot;&gt;Mira&lt;/a&gt;, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:teresa:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:teresa:start&quot;&gt;Teresa&lt;/a&gt;, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:markus:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:markus:start&quot;&gt;Markus&lt;/a&gt; und &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:raphael:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:raphael:start&quot;&gt;Raphael&lt;/a&gt;, produziert am &lt;a href=&quot;http://www.austriagamejam.org&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.austriagamejam.org&quot;  rel=&quot;nofollow&quot;&gt;Austria Game Jam 2010&lt;/a&gt; für den &lt;a href=&quot;http://globalgamejam.com&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://globalgamejam.com&quot;  rel=&quot;nofollow&quot;&gt;Global Game Jam&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;monkeydöner&quot; [1728-2175] --&gt;
&lt;h3&gt;&lt;a name=&quot;spukhaus&quot; id=&quot;spukhaus&quot;&gt;Spukhaus&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:code:easygui:spukhaus&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:code:easygui:spukhaus&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;media=code:spukhaus.jpg&quot; class=&quot;medialeft&quot; align=&quot;left&quot; title=&quot;Screenshot von Teresa&amp;#039;s Spookhaus Spiel&quot; alt=&quot;Screenshot von Teresa&amp;#039;s Spookhaus Spiel&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Spukhaus gibt es in deutsch bzw Englisch:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:code:easygui:spukhaus&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:code:easygui:spukhaus&quot;&gt;Spukhaus (deutsch)&lt;/a&gt; von  &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:teresa:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:teresa:start&quot;&gt;Teresa&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=en:code:easygui:spukhaus&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;en:code:easygui:spukhaus&quot;&gt;spooky house (englisch)&lt;/a&gt; von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:mira:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:mira:start&quot;&gt;Mira&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Spukhaus&quot; [2176-2522] --&gt;
&lt;h3&gt;&lt;a name=&quot;viva_la_windows&quot; id=&quot;viva_la_windows&quot;&gt;Viva la Windows&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:aaron:start&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:personen:aaron:start&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;media=de:games:viva_la_windows_screenshot.jpg&quot; class=&quot;medialeft&quot; align=&quot;left&quot; title=&quot;Screenshot von Viva la Windows&quot; alt=&quot;Screenshot von Viva la Windows&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;  * &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:aaron:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:aaron:start&quot;&gt;Viva la Windows&lt;/a&gt; von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:aaron:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:aaron:start&quot;&gt;Aaron&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Viva la Windows&quot; [2523-2744] --&gt;
&lt;h4&gt;&lt;a name=&quot;spiele_mit_eigener_wiki-seite&quot; id=&quot;spiele_mit_eigener_wiki-seite&quot;&gt;Spiele mit eigener Wiki-Seite&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;p class=&quot;catpageheadline&quot;&gt;Unterkategorien:&lt;/p&gt;
&lt;div class=&quot;catpagecol&quot;&gt;&lt;ul&gt;&lt;div class=&quot;catpagechars&quot;&gt;B&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=blog:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;blog:start&quot;&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;div class=&quot;catpagechars&quot;&gt;D&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:start&quot;&gt;de&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;div class=&quot;catpagechars&quot;&gt;E&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=en:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;en:start&quot;&gt;en&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;div class=&quot;catpagecol&quot;&gt;&lt;ul&gt;
&lt;div class=&quot;catpagechars&quot;&gt;F&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=fr:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;fr:start&quot;&gt;fr&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;div class=&quot;catpagechars&quot;&gt;P&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=playground:playground&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;playground:playground&quot;&gt;playground&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;div class=&quot;catpagechars&quot;&gt;U&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=user:start&quot; class=&quot;wikilink2&quot; target=&quot;_parent&quot; title=&quot;user:start&quot; rel=&quot;nofollow&quot;&gt;user&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;div class=&quot;catpagecol&quot;&gt;&lt;ul&gt;
&lt;div class=&quot;catpagechars&quot;&gt;W&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=wiki:start&quot; class=&quot;wikilink2&quot; target=&quot;_parent&quot; title=&quot;wiki:start&quot; rel=&quot;nofollow&quot;&gt;wiki&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;div class=&quot;catpagechars&quot;&gt;Z&lt;/div&gt;
&lt;li class=&quot;closed&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=zur_geheimseite:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;zur_geheimseite:start&quot;&gt;zur_geheimseite&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;p class=&quot;catpageheadline&quot;&gt;Seiten in dieser Kategorie:&lt;/p&gt;
&lt;div class=&quot;catpagecol&quot;&gt;&lt;ul&gt;&lt;div class=&quot;catpagechars&quot;&gt;S&lt;/div&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=sidebar&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;sidebar&quot;&gt;sidebar&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;br class=&quot;catpageeofidx&quot;&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Spiele mit eigener Wiki-Seite&quot; [2745-2821] --&gt;
&lt;h1&gt;&lt;a name=&quot;externe_spiele&quot; id=&quot;externe_spiele&quot;&gt;externe Spiele&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Folgende Spiele stammen &lt;strong&gt;nicht&lt;/strong&gt; von Kursteilnehmern, werden aber als Ausgangsmaterial für eigene Spiele im Kurs verwendet.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;externe Spiele&quot; [2822-2977] --&gt;
&lt;h2&gt;&lt;a name=&quot;computerspiele&quot; id=&quot;computerspiele&quot;&gt;Computerspiele&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Computerspiele&quot; [2978-3005] --&gt;
&lt;h3&gt;&lt;a name=&quot;battle_of_wesnoth&quot; id=&quot;battle_of_wesnoth&quot;&gt;Battle of Wesnoth&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Wesnoth&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;http://en.wikipedia.org/wiki/Wesnoth&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=150&amp;amp;media=de:games:180px-wesnoth-1.6-5.jpg&quot; class=&quot;medialeft&quot; align=&quot;left&quot; title=&quot;screenshot von Battle of Wesnoth&quot; alt=&quot;screenshot von Battle of Wesnoth&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Wesnoth&quot; class=&quot;interwiki iw_wp&quot; target=&quot;_parent&quot; title=&quot;http://en.wikipedia.org/wiki/Wesnoth&quot;&gt;Battle of Wesnoth&lt;/a&gt; ist ein open-source Rundenstrategiespiel mit sehr schönen handgezeichneten Fantasy-Figuren. Da alle Zeichnungen creative-commons-lizensiert sind können sie in eigenen Spielen verwendet werden.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Battle of Wesnoth&quot; [3006-3354] --&gt;
&lt;h2&gt;&lt;a name=&quot;nicht_-_computerspiele&quot; id=&quot;nicht_-_computerspiele&quot;&gt;nicht - Computerspiele&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;nicht - Computerspiele&quot; [3355-3390] --&gt;
&lt;h3&gt;&lt;a name=&quot;dungeon_slayers&quot; id=&quot;dungeon_slayers&quot;&gt;Dungeon Slayers&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.dungeonslayers.com/&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;http://www.dungeonslayers.com/&quot;  rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=blog:2009:dungeonslayers.gif&quot; class=&quot;media&quot; title=&quot;Logo Dungeon Slayers&quot; alt=&quot;Logo Dungeon Slayers&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.dungeonslayers.com&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.dungeonslayers.com&quot;  rel=&quot;nofollow&quot;&gt;http://www.dungeonslayers.com&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Dungeon Slayers ist ein so gennanntes Pen&amp;amp;Paper Rollenspiel. Da es &lt;a href=&quot;http://www.creative-commons.org&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.creative-commons.org&quot;  rel=&quot;nofollow&quot;&gt;http://www.creative-commons.org&lt;/a&gt;-Lizensiert kann es als Ausgangsmaterial für eigne (Computer)spiele dienen.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Dungeon Slayers&quot; [3391-3719] --&gt;
&lt;h1&gt;&lt;a name=&quot;links&quot; id=&quot;links&quot;&gt;Links&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://help.ubuntu.com/community/Games&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;https://help.ubuntu.com/community/Games&quot;  rel=&quot;nofollow&quot;&gt;https://help.ubuntu.com/community/Games&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Links&quot; [3720-] --&gt;</description>
            <author>Horst JENS</author>
        <category>de:games</category>
            <pubDate>Tue, 09 Mar 2010 12:58:50 +0100</pubDate>
        </item>
        <item>
            <title>Raphael</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:raphael:start</link>
            <description>


&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/detail.php?id=de%3Apersonen%3Araphael%3Astart&amp;amp;media=de:personen:raphael:raphael.jpg&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:personen:raphael:raphael.jpg&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?w=300&amp;amp;media=de:personen:raphael:raphael.jpg&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Raphael&quot; [1-66] --&gt;
&lt;h4&gt;&lt;a name=&quot;lernen&quot; id=&quot;lernen&quot;&gt;Lernen&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://abop-german.berlios.de/read/index.html&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://abop-german.berlios.de/read/index.html&quot;  rel=&quot;nofollow&quot;&gt;byte of python in deutsch&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.swaroopch.com/notes/Python&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.swaroopch.com/notes/Python&quot;  rel=&quot;nofollow&quot;&gt;byte of python als orginal&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.python.org&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.python.org&quot;  rel=&quot;nofollow&quot;&gt;http://www.python.org&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://docs.python.org/library/turtle.html&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://docs.python.org/library/turtle.html&quot;  rel=&quot;nofollow&quot;&gt;turtle&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:personen:raphael:raphael.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;de:personen:raphael:raphael.zip&quot;&gt;sprühdosen-Malprogramm&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Lernen&quot; [67-384] --&gt;
&lt;h4&gt;&lt;a name=&quot;code&quot; id=&quot;code&quot;&gt;Code&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?do=export_code&amp;amp;id=de:personen:raphael:start&amp;amp;codeblock=0&quot; title=&quot;Schnipsel herunterladen&quot; class=&quot;mediafile mf_py&quot;&gt;raphael1.py&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;turtle&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; t
t.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;setpos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-10,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; du &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;75&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
   t.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   t.&lt;span class=&quot;me1&quot;&gt;rt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   t.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;du&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;#nicht mehr zeichnen&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;setpos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;seth&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;270&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;pendown&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;#wieder zeichnen&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  
t.&lt;span class=&quot;me1&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;#nicht mehr zeichnen&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;setpos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;pendown&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;#wieder zeichnen&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; ihm &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
  t.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
  t.&lt;span class=&quot;me1&quot;&gt;back&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
  t.&lt;span class=&quot;me1&quot;&gt;rt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?do=export_code&amp;amp;id=de:personen:raphael:start&amp;amp;codeblock=1&quot; title=&quot;Schnipsel herunterladen&quot; class=&quot;mediafile mf_py&quot;&gt;raphael2.py&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;
part2step005_ball_with_fixed_movement
&amp;nbsp;
bouncing ball. each frame the complete screen is filled with the background,
making this example simple to code but possible slow on larger resolutions.
Each frame, a random-coloured circle is drawn with randomized radius directly on the screen.
Try to manipulate the display.set_mode values to change the resolution.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; pygame
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
screen=pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_mode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;480&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out larger values and see what happens !&lt;/span&gt;
background = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_size&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
background.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                ,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
                ,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;# (red,green,blue)&lt;/span&gt;
background = background.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball1 = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#create a new surface (black by default)&lt;/span&gt;
ball2 = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
ball3 = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
ball1.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;         &lt;span class=&quot;co1&quot;&gt;#make black the transparent color (red,green,blue)&lt;/span&gt;
ball2.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball3.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(Surface, color, pos, radius, width=0)&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# paint blue circle&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball1 = ball1.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;       &lt;span class=&quot;co1&quot;&gt;# if you use tranparent colors you need convert_alpha()&lt;/span&gt;
ball2 = ball2.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball3 = ball3.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball1x, ball1y = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;750&lt;/span&gt;           &lt;span class=&quot;co1&quot;&gt;# start position of the ball (x,y)&lt;/span&gt;
ball2x, ball2y = 0, 0
ball3x, ball3y = 750, 350
dx1, dy1 = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;                 &lt;span class=&quot;co1&quot;&gt;# speed vector of the ball in pixel per frame&lt;/span&gt;
dx2, dy2 = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
dx3, dy3 = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#draw background on screen (overwriting all)&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1x, ball1y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;#draw the topleft corner of ball surface at pos (ballx, bally)&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2x, ball2y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3x, ball3y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
clock = pygame.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Clock&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
mainloop = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
zeit=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
FPS = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# desired framerate in frames per second. &lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; mainloop:
    &lt;span class=&quot;co1&quot;&gt;# do all this each frame&lt;/span&gt;
    milliseconds = clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# do not go faster than this framerate&lt;/span&gt;
    zeit+=milliseconds
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; event &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;QUIT&lt;/span&gt;:
            mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pygame window closed by user&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;KEYDOWN&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_ESCAPE&lt;/span&gt;:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# user pressed ESC&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_caption&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;FPS: %.2f X: %.2f Y: %.2f dx: %.2f dy:&amp;quot;&lt;/span&gt;
                               &lt;span class=&quot;st0&quot;&gt;&amp;quot; %.2f&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;clock.&lt;span class=&quot;me1&quot;&gt;get_fps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, ball1x, ball1y, dx1, dy1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# if zeit &amp;gt; random.randint(15000,20000): &lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# zeit=0&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# background.fill((random.randint(0,255)&lt;/span&gt;
                       &lt;span class=&quot;co1&quot;&gt;# ,random.randint(0,255) &lt;/span&gt;
                       &lt;span class=&quot;co1&quot;&gt;# ,random.randint(0,255)))&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# screen.blit(background, (0,0))     #draw background on screen (overwriting all)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#inside mainloop, after screen.blit(background,(0,0))&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#colour = (random.randint(0,255),random.randint(0,255),random.randint(0,255))&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#radius = random.randint(50,55)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(screen, colour , (100,100), radius, 2) # draw pulsating circle&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#calculate new center of ball &lt;/span&gt;
    ball1x += dx1
    ball2x += dx2
    ball3x += dx3
    ball1y += dy1
    ball2y += dy2
    ball3y += dy3
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;abs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1x - ball2x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 25 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;abs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1y - ball2y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;kw1&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;abs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1x - ball3x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 25 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;abs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1y - ball3y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;abs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2x - ball3x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 25 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;abs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2y - ball3y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
		   background.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
		   screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    dx1+= &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-1,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dx2+= &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-1,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dx3+= &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-1,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dy1+= &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-1,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
    dy2+= &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-1,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dy3+= &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# bounce ball if out of screen&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball1x &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        ball1x = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#dx *= -1 &lt;/span&gt;
        dx1 =&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball2x &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ball2x = 0 
        dx2 =&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball3x &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ball3x = 0 
        dx3 =&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball1x + ball1.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ball1x = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball1.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#dx *= -1&lt;/span&gt;
        dx1= -1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball2x + ball2.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ball2x = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball2.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dx2= -1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball3x + ball3.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ball3x = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball3.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dx3= -1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball1y &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        ball1y = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#dy *= -1&lt;/span&gt;
        dy1 =&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball2y &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ball2y = 0
        dy2 =&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball3y &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ball3y = 0
        dy3 =&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball1y + ball1.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ball1y = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball1.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#dy *= -1&lt;/span&gt;
        dy1= -1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball2y + ball2.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ball2y = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball2.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dy2= -1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;5,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ball3y + ball3.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ball3y = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball3.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dy3= -1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;# paint the ball    &lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;200,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;100,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;100,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;200,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;100,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;200,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1x,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball1y,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;    
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2x,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball2y,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3x,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball3y,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;# flip the screen FPS times a second&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Code&quot; [385-6833] --&gt;
&lt;h3&gt;&lt;a name=&quot;sinus_cosinus&quot; id=&quot;sinus_cosinus&quot;&gt;SINUS &amp;amp; COSINUS&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?do=export_code&amp;amp;id=de:personen:raphael:start&amp;amp;codeblock=2&quot; title=&quot;Schnipsel herunterladen&quot; class=&quot;mediafile mf_py&quot;&gt;raphael2.py&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;
part2step011-rotozoom.py
&amp;nbsp;
loading the images snake.gif from a subfolder called 'data'
The subfolder must be inside the same folder as the program itself. 
The snake surface can be moved with the cursor keys, 
rotated with a and d key and and zoomed with w and s key.
&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; pygame
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;math&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
    &lt;span class=&quot;co1&quot;&gt;# load from subfolder 'data'&lt;/span&gt;
    background = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;background640x480_a.jpg&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    snake = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;snake.gif&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt;:
    &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Unable to find the images in the folder 'data' :-( &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  
&lt;span class=&quot;co1&quot;&gt;#finally:&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
screen=pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_mode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;480&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out larger values and see what happens !&lt;/span&gt;
background = background.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# jpg can not have transparency&lt;/span&gt;
snake = snake.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;      &lt;span class=&quot;co1&quot;&gt;# png image has transparent color &lt;/span&gt;
snake_original = snake.&lt;span class=&quot;kw3&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;      &lt;span class=&quot;co1&quot;&gt;# store a unmodified copy of the snake surface&lt;/span&gt;
snakex, snakey = &lt;span class=&quot;nu0&quot;&gt;250&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;240&lt;/span&gt;            &lt;span class=&quot;co1&quot;&gt;# start position of snake surface&lt;/span&gt;
dx, dy  = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;                   &lt;span class=&quot;co1&quot;&gt;# snake speed in pixel per second !&lt;/span&gt;
speed = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;                       &lt;span class=&quot;co1&quot;&gt;# in pixel / second&lt;/span&gt;
angle = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;                        &lt;span class=&quot;co1&quot;&gt;# current orientation of snake&lt;/span&gt;
zoom = &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt;                       &lt;span class=&quot;co1&quot;&gt;# current zoom factor&lt;/span&gt;
zoomspeed = &lt;span class=&quot;nu0&quot;&gt;0.01&lt;/span&gt;                   
turnspeed = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;                  &lt;span class=&quot;co1&quot;&gt;# in Grad (360) per second&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;# blit background on screen (overwriting all)&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snake, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakex, snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# blit the snake shape &lt;/span&gt;
clock = pygame.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Clock&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;        &lt;span class=&quot;co1&quot;&gt;# create pygame clock object &lt;/span&gt;
mainloop = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
FPS = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;                           &lt;span class=&quot;co1&quot;&gt;# desired max. framerate in frames per second. &lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; mainloop:
    milliseconds = clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# milliseconds passed since last frame&lt;/span&gt;
    seconds = milliseconds / &lt;span class=&quot;nu0&quot;&gt;1000.0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# seconds passed since last frame&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; event &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;QUIT&lt;/span&gt;:
            mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pygame window closed by user&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;KEYDOWN&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_ESCAPE&lt;/span&gt;:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# user pressed ESC&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_caption&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;press cursor keys and w a s d - fps:&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;%.2f zoom: %.2f angle %.2f&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;clock.&lt;span class=&quot;me1&quot;&gt;get_fps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, zoom, angle&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# only blit the part of the background where the snake was (cleanrect)&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
        &lt;span class=&quot;co1&quot;&gt;#if the subsurface is outside the screen pygame would raise an error&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#this can happen when using rotozoom, therfore check inside try..except&lt;/span&gt;
        dirtyrect = background.&lt;span class=&quot;me1&quot;&gt;subsurface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakex,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 
                &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakey,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, snake.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, snake.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dirtyrect, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakex,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakey,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt;:
        screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# blit the whole background (slow but secure)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# move snake with cursor keys&lt;/span&gt;
    pressedkeys = pygame.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dx, dy  = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;# no cursor key, no movement&lt;/span&gt;
    angleradiant = angle &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;math&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pi&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; 2.0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; / 180.0
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; angle
    dx += &lt;span class=&quot;kw3&quot;&gt;math&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angleradiant&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; speed
    dy += &lt;span class=&quot;kw3&quot;&gt;math&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angleradiant&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; speed
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;# if pressedkeys[pygame.K_LEFT]:&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# dx -= speed&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# if pressedkeys[pygame.K_RIGHT]:&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# dx += speed&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_UP&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        speed += 2
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_DOWN&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        speed -= 2
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; speed &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        speed =&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;    
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;#calculate new center of snake &lt;/span&gt;
    snakex += dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds &lt;span class=&quot;co1&quot;&gt;# time based movement&lt;/span&gt;
    snakey += dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    &lt;span class=&quot;co1&quot;&gt;# rotate snake with a and d key&lt;/span&gt;
    turnfactor = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# neither a nor d, no turning&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if pressedkeys[pygame.K_a]:&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#turnfactor += 1 # counter-clockwise&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_LEFT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        turnfactor += &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; 
   &lt;span class=&quot;co1&quot;&gt;# if pressedkeys[pygame.K_d]:&lt;/span&gt;
       &lt;span class=&quot;co1&quot;&gt;# turnfactor -= 1 #clock-wise&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_RIGHT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        turnfactor -= &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;     
    &lt;span class=&quot;co1&quot;&gt;# zoom snake with w and s key&lt;/span&gt;
    zoomfactor = &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# neither w nor s, no zooming&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_w&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        zoomfactor += zoomspeed
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_s&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        zoomfactor -= zoomspeed
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; turnfactor &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= 0 &lt;span class=&quot;kw1&quot;&gt;or&lt;/span&gt; zoomfactor &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt;:
        angle += turnfactor &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; turnspeed &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds &lt;span class=&quot;co1&quot;&gt;# time-based turning&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; angle &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 360:
			angle -= 360
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; angle &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -&lt;span class=&quot;nu0&quot;&gt;360&lt;/span&gt;:
            angle += &lt;span class=&quot;nu0&quot;&gt;360&lt;/span&gt;
        zoom &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= zoomfactor 
        &lt;span class=&quot;co1&quot;&gt;# the surface shrinks and zooms and moves by rotating&lt;/span&gt;
        oldrect = snake.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# store current surface rect&lt;/span&gt;
        snake = pygame.&lt;span class=&quot;me1&quot;&gt;transform&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rotozoom&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snake_original, angle, zoom&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        newrect = snake.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# store new surface rect&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# put new surface rect center on same spot as old surface rect center&lt;/span&gt;
        snakex += oldrect.&lt;span class=&quot;me1&quot;&gt;centerx&lt;/span&gt; - newrect.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt; / &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
        snakey += oldrect.&lt;span class=&quot;me1&quot;&gt;centery&lt;/span&gt; - newrect.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt; / &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# paint the snake    &lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snake, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakex,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakey,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;    
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;# flip the screen 30 times a second                # flip the screen 30 (or FPS) times a second&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;SINUS &amp; COSINUS&quot; [6834-] --&gt;</description>
            <author>Raphael Röck</author>
        <category>de:personen:raphael</category>
            <pubDate>Thu, 04 Mar 2010 18:00:12 +0100</pubDate>
        </item>
        <item>
            <title>Meine Spiele</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:julian:shoot_at_ubuntu</link>
            <description>


&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
selbst programmiert mit freundlicher Hilfe von &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:horst:start&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:horst:start&quot;&gt;Horst JENS&lt;/a&gt;

&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Meine Spiele&quot; [1-113] --&gt;
&lt;h3&gt;&lt;a name=&quot;monsterhunterwien&quot; id=&quot;monsterhunterwien&quot;&gt;Monsterhunterwien&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;p&gt;&lt;div class=&quot;notetip&quot;&gt;
Hier ist der Link zu meinem spielanfang(noch nicht fertig und wenn ihr weiter gemacht habt Kontaktiert mich bitte(das muss nicht heißen das ich es gut finde) )
&lt;/div&gt;&lt;/p&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:personen:julian:monsterhunter.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;de:personen:julian:monsterhunter.zip&quot;&gt;monsterhunter.zip&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Das ist der Code (falls ihr nur den code kopieren soltet bringt das nichts weil der computer 
einen haufen an fehlermeldungen ausspucken wird das er die dateien nicht findet)

&lt;/p&gt;
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;
part2step013-catch-the-thief.py
&amp;nbsp;
Loading  images and sounds from a subfolder called 'data'
The subfolder must be inside the same folder as the program itself. 
The player(s) can control the Pygame snake (with cursor keys) and the
Tux bird (with the mouse). A blue police icon moves toward the middle
distance between snake and bird (indicated by a cross).
Your task is to catch the thief (red triangle) with the blue police circle.
The thief moves by random. You have only a short period of time. For each 
millisecond where the police circle touches the thief triangle, you get points.
&amp;nbsp;
cleanrect function seems to be not perfect. 
&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; play_the_game&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; pygame
    &lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&amp;nbsp;
    pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pre_init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;44100&lt;/span&gt;, -&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;2048&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# setup mixer to avoid sound lag&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
        &lt;span class=&quot;co1&quot;&gt;# load graphic files from subfolder 'data'&lt;/span&gt;
        background = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;wien.jpg&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        snake = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;Berittener Polizist.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        snakelinks = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;Berittener linker Polizist.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        bird = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;Polizist.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        birdlinks = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;linker Polizist.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        thief = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;monster.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        thieflinks = pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;linkes monster.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        police= pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;cage.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# load sound files &lt;/span&gt;
        over = pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sound&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'data'&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;'time_is_up_game_over.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        spring = pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sound&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'data'&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;'spring.wav'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt;:
        &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Unable to find or play the files in the folder 'data' :-( &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  
    &lt;span class=&quot;co1&quot;&gt;# ------- some functions for later use ----------&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;msg=&lt;span class=&quot;st0&quot;&gt;&amp;quot;pygame is cool&amp;quot;&lt;/span&gt;, colour=&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, fontsize=&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;returns a surface with text&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        myfont = pygame.&lt;span class=&quot;me1&quot;&gt;font&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;SysFont&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;None&amp;quot;&lt;/span&gt;, fontsize&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        mytext = myfont.&lt;span class=&quot;me1&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;msg, &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;, colour&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        mytext = mytext.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; mytext
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; cleanblit&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sprite,x,y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;clean a sprite from the screen, restoring the background&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        dirtyrect = background.&lt;span class=&quot;me1&quot;&gt;subsurface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x - sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                           &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y - sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                           sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dirtyrect, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x - sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y - sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; cleanrect&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x1,y1,x2,y2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;clean a rect from the screen, restoring the background&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        startx = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x1,x2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; -5&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        starty = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y1,y2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; -5&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        width = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 5 +&lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x1,x2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x1,x2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        height =&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 5+ &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y1,y2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y1,y2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
        dirtyrect = background.&lt;span class=&quot;me1&quot;&gt;subsurface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;startx, starty, width, height&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dirtyrect, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;startx, starty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sprite, x, y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;blit a sprite&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sprite, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2,
                             &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; bounce&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sprite, x, y, dx, dy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;bounce sprite if it touches the screen borders&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x - sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
            x =  sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2
            dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1 
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; x + sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            x = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - sprite.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2
            dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; y - sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
            y = sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2
            dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; y + sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            y = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - sprite.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2
            dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; x,y,dx,dy
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; randomcolour&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;returns a random colour tuple (red,green,blue)&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# ----------- start ---------&lt;/span&gt;
&amp;nbsp;
    screen=pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_mode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1024&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out larger values and see what happens !&lt;/span&gt;
    background = pygame.&lt;span class=&quot;me1&quot;&gt;transform&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background = background.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# jpg can not have transparency&lt;/span&gt;
    snake = snake.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    bird = bird.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#police = pygame.Surface((50,50)) &lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(police, (0,0,255), (25,25),25) # blue police&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#police.set_colorkey((0,0,0)) # black transparent colour &lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#police.blit(write(&amp;quot;P&amp;quot;, (255,255,255), 48), ((12,10))) # white &amp;quot;P&amp;quot;&lt;/span&gt;
    police = police.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;        &lt;span class=&quot;co1&quot;&gt;# png image has transparent color &lt;/span&gt;
    cross = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    cross.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# fill white&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;cross, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# black lines&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;cross, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    cross.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    cross = cross.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#thief = pygame.Surface((26,26))&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#thief.set_colorkey((0,0,0))&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#pygame.draw.polygon(thief, (255,0,0), [(0,0),(25,0),(12,25)])&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#thief.blit(write(&amp;quot;T&amp;quot;, (0,0,0), 32), ((6,3))) # transparent &amp;quot;T&amp;quot;&lt;/span&gt;
    thief = thief.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    thiefx, thiefy = 50,50
    thiefdx, thiefdy = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-150,150&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;150&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;150&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    thiefmaxspeed = &lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;
    erratic = &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;                            &lt;span class=&quot;co1&quot;&gt;# possible change +/- of thief speed&lt;/span&gt;
    policex, policey = &lt;span class=&quot;nu0&quot;&gt;250&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;240&lt;/span&gt;            &lt;span class=&quot;co1&quot;&gt;# start position of police surface&lt;/span&gt;
    policedx, policedy  = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;                   &lt;span class=&quot;co1&quot;&gt;# police speed in pixel per second !&lt;/span&gt;
    birdx, birdy = 100,100
    birddx, birddy = 0,0
    snakex, snakey = 200,200
    snakedx, snakedy = 0,0
    crossx, crossy = 150,150
    catch_in_last_frame = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
    catch_in_this_frame = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;470&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;360&lt;/span&gt;, 
                     screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;360&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;control the rider with the cursor keys (Enter to stop)&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;control the warrior with the mouse (left button to stop)&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;the cross is always in the middle between rider and warrior&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;the cage moves toward the cross&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;70&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;catch the wolfrider with the cage to win points&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;# blit background on screen (overwriting all)&lt;/span&gt;
    clock = pygame.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Clock&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;        &lt;span class=&quot;co1&quot;&gt;# create pygame clock object &lt;/span&gt;
    mainloop = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
    FPS = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;                     &lt;span class=&quot;co1&quot;&gt;# desired max. framerate in frames per second.       &lt;/span&gt;
    playtime = &lt;span class=&quot;nu0&quot;&gt;120.0&lt;/span&gt;              &lt;span class=&quot;co1&quot;&gt;# seconds of playtime left&lt;/span&gt;
    points = 0.0
    gameOver = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
    gameOverSound = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; mainloop:
        milliseconds = clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# milliseconds passed since last frame&lt;/span&gt;
        seconds = milliseconds / &lt;span class=&quot;nu0&quot;&gt;1000.0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# seconds passed since last frame&lt;/span&gt;
        playtime -= seconds
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; event &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;QUIT&lt;/span&gt;:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pygame window closed by user&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;KEYDOWN&lt;/span&gt;:
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_ESCAPE&lt;/span&gt;:
                    mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# user pressed ESC&lt;/span&gt;
        pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_caption&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;[FPS]: %.2f Snake: dx %i dy %i Bird:&amp;quot;&lt;/span&gt;
                                   &lt;span class=&quot;st0&quot;&gt;&amp;quot; dx %i dy %i police: dx %.2f dy %.2f &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; 
                                   &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;clock.&lt;span class=&quot;me1&quot;&gt;get_fps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, snakedx, snakedy,
                                    birddx, birddy, policedx, policedy &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; playtime &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
            gameOver = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; gameOver:
            &lt;span class=&quot;co1&quot;&gt;#background.fill((255,255,255)) # white b&lt;/span&gt;
            screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; gameOverSound:
                over.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                gameOverSound = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# play the sound only once&lt;/span&gt;
            screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Game Over. %.2f points. Press ESCAPE&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; points, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;128,0,128&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 64&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;20,250&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
            screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# not GameOver&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#-------- clean -----------&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanblit(police, policex, policey)&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanblit(bird, birdx, birdy)&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanblit(snake, snakex, snakey)&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanblit(cross, crossx, crossy)&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanblit(thief, thiefx, thiefy)&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;360&lt;/span&gt;, 
                     screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;360&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanrect(policex, policey,crossx,crossy)&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#cleanrect(snakex, snakey, birdx, birdy)&lt;/span&gt;
            screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;points: %.2f time left: %.2f seconds&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;points, playtime&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 
                       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;350&lt;/span&gt;,screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;# ----- compute movement ----&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# ---- mouse ---&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#(birdx, birdy) = pygame.mouse.get_pos()&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;mousex, mousey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; mousex &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; birdx:
                birddx -= 1
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; mousex &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; birdx:
                birddx += 1
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; mousey &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; birdy:
                birddy -= 1
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; mousey &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; birdy:
                birddy += 1
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; == &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;:
                birddx = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# stop movement by mouseclick (left button)&lt;/span&gt;
                birddy = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# ---- keyboard ------&lt;/span&gt;
            pressedkeys = pygame.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# all keys that are pressed now&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_a&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                snakedx -= 2
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_d&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                snakedx += 2
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_w&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                snakedy -= 2
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_s&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                snakedy += 2
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressedkeys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_RETURN&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                snakedx = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# stop movement by pressing the 's' key&lt;/span&gt;
                snakedy = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# ------------ AI ----------------&lt;/span&gt;
            crossx = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdx,snakex&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdx, snakex&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; -  &lt;span class=&quot;co1&quot;&gt;# cross is in the middle of bird and snake &lt;/span&gt;
                     &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdx,snakex&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; / 2.0 -cross.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2
            crossy = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdy,snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdy, snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - 
                     &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdy,snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; / 2.0 - cross.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; crossx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; policex:
                policedx -= &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;        &lt;span class=&quot;co1&quot;&gt;# police moves toward cross&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; crossx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; policex:
                policedx += 1
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; crossy &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; policey:
                policedy += 1
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; crossy &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; policey:
                policedy -= 1
            thiefdx += &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; -erratic,erratic &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# thief is erratic&lt;/span&gt;
            thiefdy += &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; -erratic,erratic &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            thiefdx = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thiefdx, -thiefmaxspeed&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;         &lt;span class=&quot;co1&quot;&gt;# limit speed of thief&lt;/span&gt;
            thiefdx = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thiefdx, thiefmaxspeed&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            thiefdy = &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thiefdy, -thiefmaxspeed&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            thiefdy = &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thiefdy, thiefmaxspeed&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# ---- friction... sprites get slower ----&lt;/span&gt;
            policedx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt;
            policedy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt;
            snakedx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt;
            snakedy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt;
            birddx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt;
            birddy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# --------- new position -----------&lt;/span&gt;
            policex += policedx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds 
            policey += policedy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            birdx += birddx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            birdy += birddy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            snakex += snakedx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            snakey += snakedy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            thiefx += thiefdx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            thiefy += thiefdy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            &lt;span class=&quot;co1&quot;&gt;# ----------- bounce ----------&lt;/span&gt;
            policex, policey, policedx, policedy = bounce&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;police, policex, policey, policedx, policedy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            birdx, birdy, birddx, birddy = bounce&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bird, birdx, birdy, birddx, birddy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            snakex, snakey, snakedx, snakedy = bounce&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snake, snakex, snakey, snakedx, snakedy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            thiefx, thiefy, thiefdx, thiefdy = bounce&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thief, thiefx, thiefy, thiefdx, thiefdy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# --- police got thief ? -----&lt;/span&gt;
            distx =  &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;policex + police.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2 , thiefx + 
                     thief.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;policex + 
                     police.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2, thiefx + thief.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            disty =  &lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;policey + police.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2 , thiefy + 
                     thief.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;policey + police.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,
                     thiefy + thief.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            catch_in_last_frame = catch_in_this_frame &lt;span class=&quot;co1&quot;&gt;# save old catch info&lt;/span&gt;
            catch_in_this_frame = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;distx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; police.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; /2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;disty &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; police.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                catch_in_this_frame = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
                points += seconds
                screen.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;randomcolour&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_busy&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                    spring.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# only play this sound if mixer is silent at the moment&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;# no catch this time&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; catch_in_last_frame:
                    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# restore background&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# ---------- blit ----------------&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; birddx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;# bird (fussoldat) schaut nach rechts&lt;/span&gt;
                draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bird, birdx, birdy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;# bird schaut nach links&lt;/span&gt;
                draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdlinks, birdx, birdy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; thiefdx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;# bird (fussoldat) schaut nach rechts&lt;/span&gt;
                draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thief, thiefx, thiefy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;# bird schaut nach links&lt;/span&gt;
                draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;thieflinks, thiefx, thiefy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; snakedx&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0 :  
                draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snake, snakex, snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakelinks,snakex,snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen, randomcolour&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;snakex,snakey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;birdx, birdy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen, randomcolour&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;crossx,crossy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;policex, policey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;police, policex, policey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            draw&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;cross, crossx, crossy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;# flip the screen FPS times a second                &lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;# check if the program is imported. if not, start it directly&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; __name__ == &lt;span class=&quot;st0&quot;&gt;&amp;quot;__main__&amp;quot;&lt;/span&gt;:
    play_the_game&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Monsterhunterwien&quot; [114-] --&gt;</description>
            <author>Julian Plochberger</author>
        <category>de:personen:julian</category>
            <pubDate>Tue, 02 Mar 2010 18:09:34 +0100</pubDate>
        </item>
        <item>
            <title>Marvin</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:marvin:start</link>
            <description>


&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:marvin:internet&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:personen:marvin:internet&quot;&gt;Internet&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Hallo ich bin der Marvin.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/detail.php?id=de%3Apersonen%3Amarvin%3Astart&amp;amp;media=personen:marvin.jpg&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;personen:marvin.jpg&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=personen:marvin.jpg&quot; class=&quot;media&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Ich bin 14 und gehe in die 5.Klasse
&lt;/p&gt;

&lt;p&gt;
Kampfsimulator:
&lt;/p&gt;
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Das folgende ist ein kleiner Kampfsimulator&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; easygui
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Monster:
     &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;loretta&amp;quot;&lt;/span&gt;, attack=50, defense=50, luck=20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;=attack
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;luck&lt;/span&gt;=luck
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=100
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;
&amp;nbsp;
zombie=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;zombie&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#print zombie.leben&lt;/span&gt;
vampir=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;vampir&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
strelok=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;strelok&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
armee_soldat=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Armee-soldat&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
geist=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;geist&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
loretta=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;loretta&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
banker=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;banker&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
lorenz=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;lorenz&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
altair=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;altair&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;38&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
wahnsinniger=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wahnsinniger&amp;quot;&lt;/span&gt;,2,2,12&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
monsterliste=&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;zombie,vampir,strelok,armee_soldat,geist,loretta,banker,lorenz,altair,wahnsinniger&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; schlag&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer, verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    wuerfel1=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wuerfel2=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wuerfel3=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wuerfel4=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;wer schlägt zuerst?&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+wuerfel1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;verteidiger.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wuerfel2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    	&lt;span class=&quot;co1&quot;&gt;# angreifer trifft&lt;/span&gt;
    	verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;-=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,angreifer.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s greift %s an (%i+%i:%i+%i)&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,
    	  angreifer.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;,wuerfel1, verteidiger.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, wuerfel2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;der treffer war genial ! %s hat nur noch %i leben&amp;quot;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
    	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s greift %s an (%i+%i:%i+%i)&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,
    	  angreifer.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;,wuerfel1, verteidiger.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, wuerfel2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; der angriff ging in den abendhimmel&amp;quot;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#altair vs. loretta&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; kampf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer, verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
&amp;nbsp;
	runde=0
	&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0:
		runde+=1
		&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;runde %d&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; runde
		&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s %d %s %d&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;angriff&amp;quot;&lt;/span&gt;
		schlag&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer,verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0:
			&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;gegenangriff&amp;quot;&lt;/span&gt;
			schlag&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;verteidiger,angreifer&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 0:
		sieger = angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
		sieger = verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; %s hat gesiegt&amp;quot;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; sieger
	&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; sieger
&lt;span class=&quot;co1&quot;&gt;#print &amp;quot;angreifer %d verteidiger %d&amp;quot; % (angreifer.leben, verteidiger.leben)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#testen&lt;/span&gt;
ss=0
sb=0
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; duell &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,101&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
	sieger =  kampf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strelok, banker&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;-------------------------------------------------------------&amp;quot;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; sieger
	&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;-------------------------------------------------------------&amp;quot;&lt;/span&gt;
	strelok.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=100
	banker.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=100
	&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; sieger == &lt;span class=&quot;st0&quot;&gt;&amp;quot;strelok&amp;quot;&lt;/span&gt;:
		ss+=1
	&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
		sb+=1
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;strelok: banker&amp;quot;&lt;/span&gt;,ss, sb&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Marvin&quot; [1-2790] --&gt;
&lt;h1&gt;&lt;a name=&quot;fertiger_grosser_kampfsimulator&quot; id=&quot;fertiger_grosser_kampfsimulator&quot;&gt;Fertiger großer Kampfsimulator&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
(hat ein paar Grammatik schwächen)
&lt;/p&gt;
&lt;pre class=&quot;code python&quot;&gt;&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Das folgende ist ein kleiner Kampfsimulator
14:Waffen sollen in den Kämpfen eine Rolle spielen&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; easygui
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Waffe:
	&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;stock&amp;quot;&lt;/span&gt;, attack=1, defense=1, kraft=0, leben=0, trefferdelta=0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
		&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
		&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;=attack
		&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
		&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;=kraft
		&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltaleben&lt;/span&gt;=leben
		&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt;=trefferdelta
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Monster:
     &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;loretta&amp;quot;&lt;/span&gt;, attack=50, defense=50, kraft=50,  waffenliste=&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;=attack
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=100
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;=kraft
         &lt;span class=&quot;co1&quot;&gt;#self.waffenliste=waffenliste&lt;/span&gt;
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;=waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;waffenliste&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;+=&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltaleben&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
     &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; vorstellen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
         &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;------------------------%s---------------------&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;
         &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ich bin unbewaffnet. Meine Werte: %i angriff %i defense und %i kraft&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
         &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ich bin bewaffnet mit %s,  %i angriff %i defense und %i kraft&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;+&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
waffendir = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;schwert&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem schwert&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# -20, weil es beim angriff behindert&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;schild&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem schild&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;aktenkoffer&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem aktenkoffer&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;schuhbänder&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;zwei schuhbändern&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;schlagring&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem schlagring&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;26&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;englischbuch&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem englischbuch&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;kainznerbiografie&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einer kainznerbiografie&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;flammenwerfer&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem flammenwerfer&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;maschinengewehr&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem maschinengewehr&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;bleistift&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem bleistift&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;alter pc&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem alten pc&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wasserpistole&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einer wasserpistole&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;grabstein&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem grabstein&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;schaufel&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einer schaufel&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;spitzer holzplock&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem spitzen holzplock&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;vampirzähne&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;vampirzähnen&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;29&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;titten&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;titten&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;schwere handtasche&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einer schweren handtasche&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;lebende ratten&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;lebenden ratten&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;#-25, weil ratten schwer zu fangen sind... &lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;dolch&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem dolch&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;vergammeltes butterbrot&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;einem vergammelten butterbrot&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;alte spritzen&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;alten spritzen&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;hässliche Cousinen&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;hässlichen Cousinen&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;eigener fuß&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;meinem fuß&amp;quot;&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;verfluchte vampirzähne&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;meinen verluchten vampirzähnen&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,-&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
zombie=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;zombie&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;grabstein&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schaufel&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;eigener fuß&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#print zombie.leben&lt;/span&gt;
vampir=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;vampir&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;spitzer holzplock&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;vampirzähne&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;verfluchte vampirzähne&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#test monster&lt;/span&gt;
strelok=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;strelok&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;maschinengewehr&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;flammenwerfer&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
armee_soldat=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Armee-soldat&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;maschinengewehr&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schlagring&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
geist=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;geist&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;lebende ratten&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schwert&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schild&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;#schild und schwert ,weil der geist in einem schloss/burg wohnt&lt;/span&gt;
loretta=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;loretta&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;titten&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schwere handtasche&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#test monster&lt;/span&gt;
banker=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;banker&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;bleistift&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;alter pc&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;aktenkoffer&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;englischbuch&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
lorenz=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;lorenz&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;27&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;wasserpistole&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;kainznerbiografie&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schlagring&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schuhbänder&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
altair=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;altair&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;39&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;dolch&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;vergammeltes butterbrot&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
wahnsinniger=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wahnsinniger&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;titten&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;vergammeltes butterbrot&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;bleistift&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;alter pc&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;aktenkoffer&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schwert&amp;quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;schild&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;wasserpistole&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;spitzer holzplock&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;dolch&amp;quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;lebende ratten&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schwere handtasche&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schaufel&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;grabstein&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;maschinengewehr&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;flammenwerfer&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;kainznerbiografie&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;englischbuch&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schuhbänder&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;schlagring&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;alte spritzen&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
alte_omi=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;alte omi&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;23&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;hässliche Cousinen&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
monsterliste=&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;zombie,vampir,strelok,armee_soldat,geist,loretta,banker,lorenz,altair,wahnsinniger,alte_omi&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; schlag&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer, verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    wuerfel1=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wuerfel2=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wuerfel3=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wuerfel4=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;wer schlägt zuerst?&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s %d %s %d&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s greift %s an %i:%i (%i+%i:%i+%i)&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, 
                                                  verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,
                                                  angreifer.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+wuerfel1,
                                                  verteidiger.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+verteidiger.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wuerfel2,
                                                  angreifer.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;,wuerfel1,
                                                  verteidiger.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+verteidiger.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, wuerfel2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;attack&lt;/span&gt;+wuerfel1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;verteidiger.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+verteidiger.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wuerfel2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
     &lt;span class=&quot;co1&quot;&gt;# angreifer trifft&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#verteidiger.leben-=random.randint(angreifer.kraft/4,angreifer.kraft)&lt;/span&gt;
     schaden=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,angreifer.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
     verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;-=schaden
     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0:
         &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s trinkt das Blut des Gengners und gewinnt %i Leben&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
         angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;+=angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;0:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s verletzt sich selber durch %s und verliert %i Leben&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;+=angreifer.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;trefferdelta&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; schaden&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0.75&lt;/span&gt;:
         wow=&lt;span class=&quot;st0&quot;&gt;&amp;quot;der treffer war genial!&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; schaden&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0.50&lt;/span&gt;:
         wow=&lt;span class=&quot;st0&quot;&gt;&amp;quot;der war ordenlich, aber nicht herausragend&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; schaden&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0.25&lt;/span&gt;:
         wow=&lt;span class=&quot;st0&quot;&gt;&amp;quot;der treffer war unter dem durchschnitt, vielleicht beim nächsten mal&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; schaden&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;angreifer.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0.10&lt;/span&gt;:
         wow=&lt;span class=&quot;st0&quot;&gt;&amp;quot;gerade noch getroffen&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
         wow=&lt;span class=&quot;st0&quot;&gt;&amp;quot;schäm dich&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s %s verursacht %i schaden bei %s &amp;quot;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wow, angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, schaden,verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;der angriff ging in den abendhimmel&amp;quot;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#altair vs. loretta&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; kampf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer, verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
     angreifer.&lt;span class=&quot;me1&quot;&gt;vorstellen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
     verteidiger.&lt;span class=&quot;me1&quot;&gt;vorstellen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;---------------------------------------------------&amp;quot;&lt;/span&gt;
     runde=0
     &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; runde&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;100:
          runde+=1
          &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;==============---- Runde %i ----================&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; runde
          &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;angriff&amp;quot;&lt;/span&gt;
          schlag&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer,verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
          &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0 &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0:
               &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;gegenangriff&amp;quot;&lt;/span&gt;
               schlag&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;verteidiger,angreifer&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 0:
          sieger = verteidiger.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
          sieger = angreifer.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; %s hat gesiegt&amp;quot;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; sieger
     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; sieger
&lt;span class=&quot;co1&quot;&gt;#print &amp;quot;angreifer %d verteidiger %d&amp;quot; % (angreifer.leben, verteidiger.leben)&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#testen&lt;/span&gt;
ss=0
sb=0
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; duell &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
     sieger =  kampf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;zombie, vampir&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;-------------------------------------------------------------&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; sieger
     &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;-------------------------------------------------------------&amp;quot;&lt;/span&gt;
     zombie.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=100
     vampir.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=100
     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; sieger == &lt;span class=&quot;st0&quot;&gt;&amp;quot;zombie&amp;quot;&lt;/span&gt;:
          ss+=1
     &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
          sb+=1
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;zombie: vampir&amp;quot;&lt;/span&gt;,ss, sb
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#jedes monster hat eine kleine gruppe,l aus möglichen waffen...zb banker mit kugelschreiber,lebender sekritärin aktenkoffer,...&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#zombie wirft grabsteine oder seinen fuß...dass kostet aber leben,...&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Fertiger großer Kampfsimulator&quot; [2791-10911] --&gt;
&lt;h3&gt;&lt;a name=&quot;xturtle&quot; id=&quot;xturtle&quot;&gt;xturtle&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code python&quot;&gt;&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; xturtle &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; xt
xt.&lt;span class=&quot;me1&quot;&gt;bgcolor&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;black&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; marvin &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;101&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    xt.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;red&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;blue&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;87&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;marvin&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;yellow&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
xt.&lt;span class=&quot;me1&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
xt.&lt;span class=&quot;me1&quot;&gt;home&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
xt.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-151&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
xt.&lt;span class=&quot;me1&quot;&gt;pendown&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; marvin &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;201&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    xt.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;red&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;fd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;marvin&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;pendown&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    xt.&lt;span class=&quot;me1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;blue&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code python&quot;&gt;&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Das folgende ist ein kleiner Kampfsimulator
14:Waffen sollen in den Kämpfen eine Rolle spielen&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; easygui
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;stock&amp;quot;&lt;/span&gt;, speed=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, zielgenauigkeit=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; , kraft=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; , failrisk=&lt;span class=&quot;nu0&quot;&gt;0.9&lt;/span&gt;, feuerrate=&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, munition=&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt; , defense=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, gruppe=&lt;span class=&quot;st0&quot;&gt;&amp;quot;primär&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;=speed
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;=zielgenauigkeit
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;=kraft
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;failrisk&lt;/span&gt;=failrisk
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;feuerrate&lt;/span&gt;=feuerrate
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;munition&lt;/span&gt;=munition
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruppe&lt;/span&gt;=gruppe
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
     &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;loretta&amp;quot;&lt;/span&gt;, speed=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, zielgenauigkeit=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, defense=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, ruestung=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, leben=&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, waffe=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;=speed
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;=zielgenauigkeit &lt;span class=&quot;co1&quot;&gt;#fähigkeit des schützen&lt;/span&gt;
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;ruestung&lt;/span&gt;=ruestung
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=leben
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;=waffe
&amp;nbsp;
&amp;nbsp;
waffendir = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;P90&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;p90&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;primär&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;MP5&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;mp5&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.4&lt;/span&gt;,  &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;primär&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
monolithsoldat=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;monolithsoldat&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;,waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;P90&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
zombie=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;zombie&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;,waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;MP5&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; schusswechsel&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x, y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    wspeedx=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wspeedy=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    runde=1
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s greift %s an %i:%i (%i+%i+%i:%i+%i+%i)&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, y.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,
                                            x.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+x.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedx, y.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+y.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedy, x.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, x.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;,wspeedx, 
                                       y.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, y.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, wspeedy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;schlag&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+x.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; y.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+y.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedy:
        kampfrunde &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x,y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; y.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0:
           &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;gegenschlag&amp;quot;&lt;/span&gt;
           kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y,x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
        kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y,x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;0:
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;gegenschlag&amp;quot;&lt;/span&gt;
            kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x,y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a,v&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    wzielgenauigkeita=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-10,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wdefensev=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#treffer?&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s trifft %s %i:%i (%i+%i+%i:%i+%i+%i)&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, v.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, a.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+wzielgenauigkeita, v.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+v.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wdefensev, 
                                                      a.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;,a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;,wzielgenauigkeita, v.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;,v.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;,wdefensev&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; a.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+wzielgenauigkeita &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;  v.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+v.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wdefensev:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;treffer!&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;der schlag geht in den abendhimmel&amp;quot;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#los&lt;/span&gt;
schusswechsel&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;monolithsoldat,zombie&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code python&quot;&gt;&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Das folgende ist ein kleiner Kampfsimulator
14:Waffen sollen in den Kämpfen eine Rolle spielen&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;Tkinter&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; t
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;stock&amp;quot;&lt;/span&gt;, speed=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, zielgenauigkeit=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; , kraft=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; , failrisk=&lt;span class=&quot;nu0&quot;&gt;0.9&lt;/span&gt;, feuerrate=&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, munition=&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt; , defense=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, gruppe=&lt;span class=&quot;st0&quot;&gt;&amp;quot;primär&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;=speed
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;=zielgenauigkeit
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;=kraft
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;failrisk&lt;/span&gt;=failrisk
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;feuerrate&lt;/span&gt;=feuerrate
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;munition&lt;/span&gt;=munition
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
        &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruppe&lt;/span&gt;=gruppe
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
     &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,name=&lt;span class=&quot;st0&quot;&gt;&amp;quot;loretta&amp;quot;&lt;/span&gt;, speed=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, zielgenauigkeit=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, defense=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, ruestung=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, leben=&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, waffe=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;=name
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;=speed
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;=zielgenauigkeit &lt;span class=&quot;co1&quot;&gt;#fähigkeit des schützen&lt;/span&gt;
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;=defense
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;ruestung&lt;/span&gt;=ruestung
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=leben
         &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;=waffe
&amp;nbsp;
&amp;nbsp;
waffendir = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;P90&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;p90&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;primär&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;MP5&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;=Waffe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;mp5&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.4&lt;/span&gt;,  &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;primär&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
monolithsoldat=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;monolithsoldat&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;,waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;P90&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
zombie=Monster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;zombie&amp;quot;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;,waffendir&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;MP5&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; schusswechsel&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x, y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    output=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
    wspeedx=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wspeedy=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    zeile= &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s greift %s an %i:%i (%i+%i+%i:%i+%i+%i) &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, y.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;,
                                            x.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+x.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedx, y.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+y.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedy, x.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, x.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;,wspeedx, 
                                       y.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, y.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, wspeedy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#print zeile                                &lt;/span&gt;
    output += zeile                            
    output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot;angriff &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+x.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; y.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+y.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;+wspeedy:
        output+= kampfrunde &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x,y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; y.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
           output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot;gegenangriff&amp;quot;&lt;/span&gt;
           output+=kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y,x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
        output+=kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y,x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
            output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot;gegenangriff&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; output
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; output       
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; kampfrunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a,v&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    output=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
    wzielgenauigkeita=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-10,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wdefensev=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-10,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    wvolltreffer=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#treffer?&lt;/span&gt;
&amp;nbsp;
    zeile = &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s trifft %s %i:%i (%i+%i+%i:%i+%i+%i) &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, v.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, a.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+wzielgenauigkeita, v.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+v.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wdefensev, 
                                                      a.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;,a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;,wzielgenauigkeita, v.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;,v.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;,wdefensev&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    output += zeile
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; a.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;zielgenauigkeit&lt;/span&gt;+wzielgenauigkeita &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;  v.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+v.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;+wdefensev:
        output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot;treffer! &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;
        impact=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;#*a.waffe.kraft)&lt;/span&gt;
        zeile= &lt;span class=&quot;st0&quot;&gt;&amp;quot;impact: %f x kraft: %i = %i &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;impact, a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;, impact &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        output+=zeile
        impact =&lt;span class=&quot;kw2&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;impact&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; a.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        schaden=impact- v.&lt;span class=&quot;me1&quot;&gt;ruestung&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; schaden&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
            zeile= &lt;span class=&quot;st0&quot;&gt;&amp;quot;%s verursacht %i schaden &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;, schaden&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            output+=zeile
            v.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;-=schaden
            output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot;so viel leben ist noch übrig: %i &lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; v.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
            output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot; dein gegener war zu stark, haha....&amp;quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
        output+= &lt;span class=&quot;st0&quot;&gt;&amp;quot;der schlag geht in den abendhimmel&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; output
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;# jetz gehts wirklich los&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;#gefecht(monolithsoldat, zombie)&lt;/span&gt;
&amp;nbsp;
spieler=monolithsoldat
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; einerunde&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer, verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    angreifer.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;, verteidiger.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;=kampf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;angreifer, verteidiger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; lol&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;co1&quot;&gt;#print&amp;quot;karte, etc.&amp;quot;&lt;/span&gt;
    text1.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;karte&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    text2.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;medkit&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    text3.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;stein&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    text4.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ast&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    text5.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;p90&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; hallo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;P90&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#meldung.set(&amp;quot;leben&amp;quot;)&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; hey&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    kampfbericht=schusswechsel&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;zombie, spieler&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; ad&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;co1&quot;&gt;#print&amp;quot;medkit&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#meldung.set(&amp;quot;arsch&amp;quot;)&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; flucht&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; tolles_inventar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    inventar=&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tux&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;fenster&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;appfel&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;fux&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;cod&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;portal&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; 
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; mies_inventar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    inventar1=&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;lalala&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;asdasdad&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;st.lorenz_strom&amp;quot;&lt;/span&gt;,&lt;span class=&quot;st0&quot;&gt;&amp;quot;chicago&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
root=t.&lt;span class=&quot;me1&quot;&gt;Tk&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#meldung=t.StringVar()&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#meldung.set(&amp;quot;hallo&amp;quot;)&lt;/span&gt;
gegner=zombie
statuslinks=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
statusrechts=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
kampfbericht=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
statuslinks.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Status: SPD: %i DEF: %i KRT: %i HP: %i&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt; Waffe: %s&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;spieler.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, spieler.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, spieler.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;, spieler.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;, spieler.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
statusrechts.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Status: SPD: %i DEF: %i KRT: %i HP: %i&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt; Waffe: %s&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gegner.&lt;span class=&quot;me1&quot;&gt;speed&lt;/span&gt;, gegner.&lt;span class=&quot;me1&quot;&gt;defense&lt;/span&gt;, gegner.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kraft&lt;/span&gt;, gegner.&lt;span class=&quot;me1&quot;&gt;leben&lt;/span&gt;, gegner.&lt;span class=&quot;me1&quot;&gt;waffe&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
kampfbericht.&lt;span class=&quot;kw2&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, text=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Ich vs. Zombie&amp;quot;&lt;/span&gt;, borderwidth=1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=0,column=0, columnspan=5&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=statuslinks, borderwidth=1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=1,column=0, columnspan=2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=statusrechts, borderwidth=1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=1, column=3, columnspan=2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
marvin= t.&lt;span class=&quot;me1&quot;&gt;PhotoImage&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;marvin1.gif&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, image=marvin&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=2, column=0, rowspan=5 ,columnspan=2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
marvin1= t.&lt;span class=&quot;me1&quot;&gt;PhotoImage&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;marvin2.gif&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, image=marvin1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, rowspan=&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, columnspan=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, text=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Inventar&amp;quot;&lt;/span&gt;, command=lol&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, text=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Waffe wechseln&amp;quot;&lt;/span&gt;, command=hallo&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, text=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Angreiffen&amp;quot;&lt;/span&gt;, command=hey&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, text=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Flüchten&amp;quot;&lt;/span&gt;, command=flucht&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, text=&lt;span class=&quot;st0&quot;&gt;&amp;quot;Medkit&amp;quot;&lt;/span&gt;, command=ad&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
text1=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
text2=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
text3=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
text4=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
text5=t.&lt;span class=&quot;me1&quot;&gt;StringVar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=text1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=text2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=text3&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=text4&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=text5&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
t.&lt;span class=&quot;me1&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;root, textvariable=kampfbericht&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;row=&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;, column=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, columnspan=&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
root.&lt;span class=&quot;me1&quot;&gt;mainloop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=personen:marvin:marvin200909.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;personen:marvin:marvin200909.zip&quot;&gt;marvin200909.zip&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:personen:marvin:marvin_blut_und_morde.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;de:personen:marvin:marvin_blut_und_morde.zip&quot;&gt;marvin_blut_und_morde.zip&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;xturtle&quot; [10912-] --&gt;</description>
            <author>Marvin Tauchner</author>
        <category>de:personen:marvin</category>
            <pubDate>Tue, 02 Mar 2010 14:58:41 +0100</pubDate>
        </item>
        <item>
            <title>Markus Hauser</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:personen:markus:start</link>
            <description>


&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Byte of Python lesen: &lt;a href=&quot;http://www.swaroopch.com/notes/Python&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.swaroopch.com/notes/Python&quot;  rel=&quot;nofollow&quot;&gt;http://www.swaroopch.com/notes/Python&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Pygame gibt&amp;#039;s hier: &lt;a href=&quot;http://pygame.org/&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://pygame.org/&quot;  rel=&quot;nofollow&quot;&gt;http://pygame.org/&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Markus Hauser&quot; [1-131] --&gt;
&lt;h4&gt;&lt;a name=&quot;schweifdemo&quot; id=&quot;schweifdemo&quot;&gt;schweifdemo&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?do=export_code&amp;amp;id=de:personen:markus:start&amp;amp;codeblock=0&quot; title=&quot;Schnipsel herunterladen&quot; class=&quot;mediafile mf_py&quot;&gt;schweifdemo.py&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;wizard duell
by markus, mira, raphael and theresa.
&amp;nbsp;
&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; pygame
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;ver&lt;/span&gt; 
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; megaultrasuperfatdef&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;humanplayers=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,datadir=&lt;span class=&quot;st0&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
&amp;nbsp;
    HITPOINTS = &lt;span class=&quot;nu0&quot;&gt;100.0&lt;/span&gt;
    FORCE_OF_GRAVITY = &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# in pixel per second² .See http://en.wikipedia.org/wiki/Gravitational_acceleration&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;msg=&lt;span class=&quot;st0&quot;&gt;&amp;quot;pygame is cool&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;write text into pygame surfaces&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        myfont = pygame.&lt;span class=&quot;me1&quot;&gt;font&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;SysFont&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;None&amp;quot;&lt;/span&gt;, 100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        mytext = myfont.&lt;span class=&quot;me1&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;msg, &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        mytext = mytext.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; mytext
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1, 20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;farbe, delta&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; farbe &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 255:
            farbe=255
            delta&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;=-1
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; farbe &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
            farbe=0
            delta = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; farbe,delta
    &lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; dummysound:
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; play&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;: &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;: 
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; dummysound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;datadir, &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
            sound = pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sound&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; sound
        &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;error&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Warning, unable to load,&amp;quot;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; dummysound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pre_init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;44100,-16,2,2048&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    PEACEZEIT = .5
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Warning, no sound'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;None&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#load the sound effects&lt;/span&gt;
    bump = load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'bump.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    tock = load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'tock.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    winna = load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'winner.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;:
            music = &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;datadir,&lt;span class=&quot;st0&quot;&gt;'an-turr.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;music&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;music&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;music&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Hirni&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        hirnis = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        number = 0
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,spieler,pos,links=pygame.&lt;span class=&quot;me1&quot;&gt;K_LEFT&lt;/span&gt;,rechts=pygame.&lt;span class=&quot;me1&quot;&gt;K_RIGHT&lt;/span&gt;,
                     unten=pygame.&lt;span class=&quot;me1&quot;&gt;K_DOWN&lt;/span&gt;,oben=pygame.&lt;span class=&quot;me1&quot;&gt;K_UP&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;Hirni  startet&amp;quot;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;=pos
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;links&lt;/span&gt;=links
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rechts&lt;/span&gt;=rechts
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;unten&lt;/span&gt;=unten
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;oben&lt;/span&gt;=oben
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;spieler&lt;/span&gt;=spieler
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;10,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;10,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;10,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt; = 0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltarot&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltagruen&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltablau&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;=pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;50,50&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;farbwechsel&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;hitpointsfull&lt;/span&gt; = HITPOINTS &lt;span class=&quot;co1&quot;&gt;# maximal hitpoints&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;hitpoints&lt;/span&gt; = HITPOINTS &lt;span class=&quot;co1&quot;&gt;# actual hitpoints&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;=&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;=&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;center&lt;/span&gt;=pos
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; = 0.0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; = 0.0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; + 0.0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; + 0.0
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt; = Hirni.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# get my personal Birdnumber&lt;/span&gt;
            Hirni.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt;+= &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;           &lt;span class=&quot;co1&quot;&gt;# increase the number for next Bird&lt;/span&gt;
            Hirni.&lt;span class=&quot;me1&quot;&gt;hirnis&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#Livebar(self) #create a Livebar for him.&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;catched&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;crashing&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; kill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;because i want to do some special effects (sound, directory etc.)
            before killing the Bird sprite i have to write my own kill(self)
            function and finally call pygame.sprite.Sprite.kill(self) 
            to do the 'real' killing&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
            tock.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            winna.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#print Bird.birds, &amp;quot;...&amp;quot;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; _ &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;100,200&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                Fragment&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            Hirni.&lt;span class=&quot;me1&quot;&gt;hirnis&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# kill Bird in sprite Directory&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; farbwechsel&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltarot&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltagruen&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltablau&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltarot&lt;/span&gt; = farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltarot&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltagruen&lt;/span&gt; = farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltagruen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltablau&lt;/span&gt; = farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltablau&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(self.image,(self.rot,self.gruen,self.blau),&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#                   (25,25),25)&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;,
                               &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                               &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;=&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; cleanstatus&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;catched&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;crashing&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; update&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,seconds&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;hirni updated sich und startet einen schweif&amp;quot;&lt;/span&gt;
            Schweif&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltarot&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltagruen&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltablau&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;farbwechsel&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            tasten  = pygame.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 0:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt;-=seconds
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt;=0
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;spieler&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;human&amp;quot;&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;#sorry for bad code&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; tasten&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;links&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                    &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; -= 1
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; tasten&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rechts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                    &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; += 1
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; tasten&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;oben&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                    &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; -= 1
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; tasten&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;unten&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                    &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; += 1
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0.995&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# bremsen&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= 0.995
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 500:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; = 500
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -500:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; = -500
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 500:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; = 500
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -500:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; = -500
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; = 0 + &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;/2
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
                tock.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; + &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;/2
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
                tock.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; = 0 + &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt;/2
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
                tock.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; + &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt;/2 &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt;/2
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
                tock.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centerx&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centery&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;#--- loose hitpoins&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;crashing&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;hitpoints&lt;/span&gt; -=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#--- check if still alive&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;hitpoints&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;= 0:
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt;==&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
                    &lt;span class=&quot;co1&quot;&gt;# findet raus ob der zauberer oder der player gestorben ist.&lt;/span&gt;
                    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;WTF!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;150&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wtf!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;150&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;You lose!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;300&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;You lose!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;300,60&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                    &lt;span class=&quot;co1&quot;&gt;# findet raus ob der zauberer oder der player gestorben ist.&lt;/span&gt;
                    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;WTF!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;150&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wtf!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;150&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;You win!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;350&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    background.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;write&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;You win!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;350,60&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Schweif&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;ist völlig unnötig&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,pos,farbe, deltarot, deltagruen, deltablau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt; = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;,farbe,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;12,12&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,10&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;=0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;=pos
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;farbe&lt;/span&gt; = farbe
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rot&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;farbe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;gruen&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;farbe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;blau&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;farbe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;2&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltarot&lt;/span&gt; = deltarot
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltagruen&lt;/span&gt; = deltagruen
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;deltablau&lt;/span&gt; = deltablau
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centerx&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centery&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;schweiftime&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;# länge vom Schweif in sekunden&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; update&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;+=&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;= &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;schweiftime&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Mine&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;liegt rum und macht bumm&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        images = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
        images.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;datadir,&lt;span class=&quot;st0&quot;&gt;&amp;quot;mine1.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        images.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;datadir,&lt;span class=&quot;st0&quot;&gt;&amp;quot;mine2.png&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,pos,bombenleger&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt; = Mine.&lt;span class=&quot;me1&quot;&gt;images&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;bombenleger&lt;/span&gt; = bombenleger
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt; = pos
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;center&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#self.lebendig = True&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; update&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; += &lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt; = Mine.&lt;span class=&quot;me1&quot;&gt;images&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#if self.time &amp;gt; 5:&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#    self.kill()&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; kill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;because i want to do some special effects (sound, directory etc.)
            before killing the mine sprite i have to write my own kill(self)
            function and finally call pygame.sprite.Sprite.kill(self) 
            to do the 'real' killing&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
            bump.&lt;span class=&quot;me1&quot;&gt;play&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#print Bird.birds, &amp;quot;...&amp;quot;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; _ &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;3,100&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                Fragment&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#Bird.birds[self.number] = None # kill mine in sprite Directory&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# kill the actual mine&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Fragment&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;a fragment of an exploding Bird&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        gravity = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# fragments fall down ?&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, pos, style=1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0.0,0.0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = pos&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = pos&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;style&lt;/span&gt;=style
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt; = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;50,50&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# black transparent&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; style == 2:
                pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                                &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 
                                                &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,45&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;100,150&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,122,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                                &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;25,25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 
                                                &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,15&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;convert_alpha&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;lifetime&lt;/span&gt; = 1 + &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# max 6 seconds&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; = 0.0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;fragmentmaxspeed&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;523&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out other factors !&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;fragmentmaxspeed&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;fragmentmaxspeed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;fragmentmaxspeed&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;fragmentmaxspeed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; update&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, seconds&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; += seconds
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;lifetime&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; += &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; Fragment.&lt;span class=&quot;me1&quot;&gt;gravity&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; += FORCE_OF_GRAVITY &lt;span class=&quot;co1&quot;&gt;# gravity suck fragments down&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centerx&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centery&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; Livebar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;shows a bar with the hitpoints of a ball sprite&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, boss&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sprite&lt;/span&gt;.&lt;span class=&quot;kw4&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt; = boss
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt; = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;,7&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# black transparent&lt;/span&gt;
            pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;,7&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;oldpercent&lt;/span&gt; = 0
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;bossnumber&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; update&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;percent&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;hitpoints&lt;/span&gt; / &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;hitpointsfull&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; 1.0
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;percent&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;oldpercent&lt;/span&gt;:
                pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,1,&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# fill black&lt;/span&gt;
                pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;image&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1,1,
                    &lt;span class=&quot;kw2&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;percent&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# fill green&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;oldpercent&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;percent&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centerx&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centerx&lt;/span&gt;
            &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centery&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;centery&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;boss&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt; /&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt; - &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;#check if boss is still alive&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; Hirni.&lt;span class=&quot;me1&quot;&gt;hirnis&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;bossnumber&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                &lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# kill the hitbar&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;#breite=640&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#hoehe=480&lt;/span&gt;
    screen=pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_mode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out larger values and see what happens !&lt;/span&gt;
    background = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_size&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    rot=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    gruen=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,255&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    blau=&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    background.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rot,gruen,blau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#fill the background white (red,green,blue)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(background, (50,50,0), (300,250), 200) # draw a circle on the background&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(background, (255,255,255), (300,250), 150)&lt;/span&gt;
    background = background.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    deltarot = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    deltagruen = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    deltablau = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    clock = pygame.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Clock&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    mainloop = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
    FPS = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# desired framerate in frames per second.&lt;/span&gt;
&amp;nbsp;
    hirnigruppe=pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Group&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    minengruppe = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Group&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    fragmentgruppe = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Group&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    livebargruppe = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Group&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    schweifgroup = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Group&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    allgroup = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;LayeredUpdates&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#hirn1=Hirni((random.randint(0,640),random.randint(0,480)))&lt;/span&gt;
    Hirni.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt; = allgroup, hirnigruppe
    Schweif.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt; = allgroup, schweifgroup
    Mine.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt; = minengruppe, allgroup
    Fragment.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt; = fragmentgruppe, allgroup
    Livebar.&lt;span class=&quot;me1&quot;&gt;groups&lt;/span&gt; = livebargruppe, allgroup
&amp;nbsp;
    Hirni._layer = 2
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;start hirn1&amp;quot;&lt;/span&gt;
    hirn1 = Hirni&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;human&amp;quot;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;50,55&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; humanplayers ==&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;:
        hirn2 = Hirni&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;human&amp;quot;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;590,430&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, pygame.&lt;span class=&quot;me1&quot;&gt;K_a&lt;/span&gt;,pygame.&lt;span class=&quot;me1&quot;&gt;K_d&lt;/span&gt;,pygame.&lt;span class=&quot;me1&quot;&gt;K_s&lt;/span&gt;,pygame.&lt;span class=&quot;me1&quot;&gt;K_w&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
        hirn2 = Hirni&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;AI&amp;quot;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;590&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;430&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    hirn3 = Hirni&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;AI&amp;quot;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;430&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    hirn4 = Hirni&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;AI&amp;quot;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;200,430&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    gameover = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
    overtime = &lt;span class=&quot;nu0&quot;&gt;9.3&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#hirnigruppe.add(hirn1,hirn2,hirn3,hirn4)&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; mainloop:
        &lt;span class=&quot;co1&quot;&gt;# do all this each frame&lt;/span&gt;
        milliseconds = clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# milliseconds passed since last frame&lt;/span&gt;
        seconds = milliseconds / &lt;span class=&quot;nu0&quot;&gt;1000.0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# seconds passed since last frame&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; gameover:
            overtime -= seconds
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; overtime &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; event &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;QUIT&lt;/span&gt;:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pygame window closed by user&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;KEYDOWN&lt;/span&gt;:
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_ESCAPE&lt;/span&gt;:
                    mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# user pressed ESC&lt;/span&gt;
                &lt;span class=&quot;co1&quot;&gt;#if event.key == pygame.K_SPACE:&lt;/span&gt;
                    &lt;span class=&quot;co1&quot;&gt;#loesch()&lt;/span&gt;
                    &lt;span class=&quot;co1&quot;&gt;#background.fill((rot,gruen,blau))     #fill the background white (red,green,blue)&lt;/span&gt;
                    &lt;span class=&quot;co1&quot;&gt;#screen.blit(background,(0,0))&lt;/span&gt;
                &lt;span class=&quot;co1&quot;&gt;#if event.key == pygame.K_LCTRL:&lt;/span&gt;
                    &lt;span class=&quot;co1&quot;&gt;#if hirn2.peacezeit==0:&lt;/span&gt;
                        &lt;span class=&quot;co1&quot;&gt;#Mine(hirn2.rect.center,2)&lt;/span&gt;
                        &lt;span class=&quot;co1&quot;&gt;#hirn2.peacezeit=PEACEZEIT&lt;/span&gt;
                &lt;span class=&quot;co1&quot;&gt;#if event.key == pygame.K_RCTRL:&lt;/span&gt;
                    &lt;span class=&quot;co1&quot;&gt;#if hirn1.peacezeit==0:&lt;/span&gt;
                        &lt;span class=&quot;co1&quot;&gt;#Mine(hirn1.rect.center,1)&lt;/span&gt;
                        &lt;span class=&quot;co1&quot;&gt;#hirn1.peacezeit=PEACEZEIT&lt;/span&gt;
&amp;nbsp;
                        &lt;span class=&quot;co1&quot;&gt;#print(&amp;quot;Habe Mine gelegt, und bin ein cooles Kind!&amp;quot;)&lt;/span&gt;
&amp;nbsp;
        tasten  = pygame.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt;==0:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;spieler&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;human&amp;quot;&lt;/span&gt;:
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; tasten&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_LCTRL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
                    Mine&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hirn2.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;center&lt;/span&gt;, 2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;co1&quot;&gt;#Mine(hirn2.rect.center,2)&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
            hirn2.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt;=PEACEZEIT
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; tasten&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_RCTRL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn1.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt;==0:
                Mine&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hirn1.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;center&lt;/span&gt;,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                hirn1.&lt;span class=&quot;me1&quot;&gt;peacezeit&lt;/span&gt;=PEACEZEIT
        rot+=deltarot
        gruen+=deltagruen
        blau+=deltablau
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hirnigruppe&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 2:
            gameover = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;spieler&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;AI&amp;quot;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; hirn1.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;:
                hirn2.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; += 10
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hirn1.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;:
                hirn2.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; -= 10
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; hirn1.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;:
                hirn2.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; += 10
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hirn1.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;:
                hirn2.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; -= 10
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;spieler&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;AI&amp;quot;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;:
                hirn3.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; += 5
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;:
                hirn3.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; -= 5
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;:
                hirn3.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; += 5
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hirn2.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;:
                hirn3.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; -= 5
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn4.&lt;span class=&quot;me1&quot;&gt;spieler&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;AI&amp;quot;&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn4.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;:
                hirn4.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; += 5
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn4.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt;:
                hirn4.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; -= 5
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn4.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;:
                hirn4.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; += 5
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; hirn4.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; hirn3.&lt;span class=&quot;me1&quot;&gt;y&lt;/span&gt;:
                hirn4.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; -= &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;
&amp;nbsp;
        rot,deltarot=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rot,deltarot&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        gruen,deltagruen=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gruen,deltagruen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        blau,deltablau=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;blau,deltablau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#background.fill((rot,gruen,blau))     #fill the background white (red,green,blue)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#screen.blit(background,(0,0))&lt;/span&gt;
&amp;nbsp;
        pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_caption&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;fps %.2f dx %.2f&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;clock.&lt;span class=&quot;me1&quot;&gt;get_fps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, hirn1.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# only blit the part of the background where the ball was (cleanrect)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#cleanrect = background.subsurface((ballx, bally, ball.get_width(), ball.get_height()))&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#screen.blit(cleanrect, (ballx, bally)) # comment out this line for a funny effect !&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#calculate new center of ball&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# time based movement. No matter how busy the cpu and how low the framerate,&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;# movement speed will always be constant.&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;#hirnigruppe.clear(screen,background)&lt;/span&gt;
        crashgroup = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;spritecollide&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hirn1, minengruppe, &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; crash &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; crashgroup:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; crash.&lt;span class=&quot;me1&quot;&gt;bombenleger&lt;/span&gt; == 1:
                &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Ich bin auf eigene Mine gestiegen, und bin ein cooles Kind!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Ich bin auf fremde Mine getreten, und bin ein cooles Kind!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                hirn1.&lt;span class=&quot;me1&quot;&gt;hitpoints&lt;/span&gt; -= 10
                crash.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        megacrashgroup = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;spritecollide&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hirn1, hirnigruppe, &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; megacrash &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; megacrashgroup:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; megacrash.&lt;span class=&quot;me1&quot;&gt;number&lt;/span&gt; == 0:
                &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                megacrash.&lt;span class=&quot;me1&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
                megacrash.&lt;span class=&quot;me1&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
&amp;nbsp;
        crashgroup2 = pygame.&lt;span class=&quot;me1&quot;&gt;sprite&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;spritecollide&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hirn2, minengruppe, &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; crash &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; crashgroup2:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; crash.&lt;span class=&quot;me1&quot;&gt;bombenleger&lt;/span&gt; == 2:
                &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Ich bin auf eigene Mine gestiegen, und bin ein cooles Kind!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Ich bin auf fremde Mine getreten, und bin ein cooles Kind!&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                hirn2.&lt;span class=&quot;me1&quot;&gt;hitpoints&lt;/span&gt; -= &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;
                crash.&lt;span class=&quot;me1&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;#pygame.sprite.groupcollide(group1, group2, dokill1, dokill2): return Sprite_dict&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#crashgroup = pygame.sprite.groupcollide(hirnigruppe, minengruppe, False, True)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#minengruppe.clear(screen, background)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#fragmentgruppe.clear(screen, background)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#fragmentgruppe.update(seconds)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#livebargruppe.clear(screen,background)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#minengruppe.update(seconds)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#hirnigruppe.update(seconds)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#livebargruppe.update(seconds)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#minengruppe.draw(screen)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#hirnigruppe.draw(background)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#hirnigruppe.draw(screen)    &lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#fragmentgruppe.draw(screen)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#livebargruppe.draw(screen)&lt;/span&gt;
         &lt;span class=&quot;co1&quot;&gt;# ----------- clear, draw , update, flip -----------------  &lt;/span&gt;
        allgroup.&lt;span class=&quot;me1&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen, background&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#print seconds&lt;/span&gt;
        allgroup.&lt;span class=&quot;me1&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;seconds&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        allgroup.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;           
        &lt;span class=&quot;co1&quot;&gt;#pygame.display.flip() &lt;/span&gt;
        pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;# flip the screen 30 times a second&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; __name__ == &lt;span class=&quot;st0&quot;&gt;&amp;quot;__main__&amp;quot;&lt;/span&gt;:
    megaultrasuperfatdef&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;quit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;schweifdemo&quot; [132-21455] --&gt;
&lt;h3&gt;&lt;a name=&quot;der_hirnschoner&quot; id=&quot;der_hirnschoner&quot;&gt;DER HIRNSCHONER&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Download:&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:personen:markus:hirnschoner.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;de:personen:markus:hirnschoner.zip&quot;&gt;hirnschoner.zip&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Hirnschoner 2:&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:personen:markus:hirni.zip&quot; class=&quot;media mediafile mf_zip&quot; target=&quot;_parent&quot; title=&quot;de:personen:markus:hirni.zip&quot;&gt;hirni.zip&lt;/a&gt;
Musik von:  &lt;a href=&quot;http://modarchive.org/index.php?request=view_by_moduleid&amp;amp;query=33502&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://modarchive.org/index.php?request=view_by_moduleid&amp;amp;query=33502&quot;  rel=&quot;nofollow&quot;&gt;http://modarchive.org/index.php?request=view_by_moduleid&amp;amp;query=33502&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Nie wieder Aspirin kaufen! Der Hirnschoner hilft bei akuten Kopfschmerzen oder Stress viel besser.
Gebrauchsanleitung: Bei plötzlichem Stress, oder Kopfschmerzen alle Arbeit liegen lassen, und Hirnschoner starten! Einfach zugucken und entspannen. Und für alle die mitmachen wollen, kann man den Ball mit W,A,S und D, das Quadrat mit den Pfeiltasten steuern. Selbstverständluch kann man auch alles mit der Maus steuern.
&lt;p&gt;&lt;div class=&quot;notewarning&quot;&gt;
&lt;strong&gt;Achtung!&lt;/strong&gt;
Der Hirnschoner enthält viele Farbeffekte, die unter Dauereinwirkung den Nutzer hypnotisieren können. Setzen sie den Hirnschoner deshalb nicht länger als 25 Stunden am Tag ein.

&lt;/div&gt;&lt;/p&gt;&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/detail.php?id=de%3Apersonen%3Amarkus%3Astart&amp;amp;media=de:personen:markus:hirnschoner.gif&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;de:personen:markus:hirnschoner.gif&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=de:personen:markus:hirnschoner.gif&quot; class=&quot;media&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;DER HIRNSCHONER&quot; [21456-22342] --&gt;
&lt;h4&gt;&lt;a name=&quot;code&quot; id=&quot;code&quot;&gt;Code&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;bouncing ball
markus hauser 2009
&amp;nbsp;
&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; pygame
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;1, 20&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;farbe, delta&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; farbe &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 255:
        farbe=255
        delta&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;=-1
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; farbe &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        farbe=0
        delta = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; farbe,delta
&lt;span class=&quot;kw1&quot;&gt;class&lt;/span&gt; dummysound:
    &lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; play&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;: &lt;span class=&quot;kw1&quot;&gt;pass&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;: 
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; dummysound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'data'&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
        sound = pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Sound&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; sound
    &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;error&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Warning, unable to load,&amp;quot;&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; dummysound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Warning, no sound'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        pygame.&lt;span class=&quot;me1&quot;&gt;mixer&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;None&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#load the sound effects&lt;/span&gt;
bump = load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'bump.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
tock = load_sound&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'tock.ogg'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#if pygame.mixer:&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#music = os.path.join('data', 'house_lo.wav')&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#pygame.mixer.music.load(music)&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#pygame.mixer.music.play(-1)&lt;/span&gt;
&amp;nbsp;
breite=&lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt;
hoehe=&lt;span class=&quot;nu0&quot;&gt;480&lt;/span&gt;
screen=pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_mode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;breite,hoehe&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out larger values and see what happens !&lt;/span&gt;
background = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_size&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
background.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#fill the background white (red,green,blue)&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(background, (50,50,0), (300,250), 200) # draw a circle on the background&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(background, (255,255,255), (300,250), 150)&lt;/span&gt;
background = background.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#create a new surface&lt;/span&gt;
ball.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;         &lt;span class=&quot;co1&quot;&gt;#make black the transparent color (red,green,blue)&lt;/span&gt;
quadrat = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
quadratx=&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;
quadraty=&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(Surface, color, pos, radius, width=0): return Rect&lt;/span&gt;
breite = &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;#linienbreite&lt;/span&gt;
ballrot=&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;
ballgruen=&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;
ballblau=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
quadratrot=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
quadratgruen=&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;
quadratblau=&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;
deltarot = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
deltagruen = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
deltablau = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
quadratdeltarot = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
quadratdeltagruen = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
quadratdeltablau = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballrot,ballgruen,ballblau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# paint blue circle&lt;/span&gt;
ball = ball.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ballx = &lt;span class=&quot;nu0&quot;&gt;550&lt;/span&gt;
bally = &lt;span class=&quot;nu0&quot;&gt;240&lt;/span&gt;
dx = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pixel per second ! ball&lt;/span&gt;
dy = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pixel per second ! ball&lt;/span&gt;
qx = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# quadrat&lt;/span&gt;
qy = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;#quadrat&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#draw background on screen (overwriting all)&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx, bally&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;#draw the ball shape&lt;/span&gt;
clock = pygame.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Clock&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
mainloop = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
FPS = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# desired framerate in frames per second.&lt;/span&gt;
dist=0
distx=0
disty=0
&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; mainloop:
    &lt;span class=&quot;co1&quot;&gt;# do all this each frame&lt;/span&gt;
    milliseconds = clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# milliseconds passed since last frame&lt;/span&gt;
    seconds = milliseconds / &lt;span class=&quot;nu0&quot;&gt;1000.0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# seconds passed since last frame&lt;/span&gt;
    clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# do not go faster than this framerate&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; event &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;QUIT&lt;/span&gt;:
            mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pygame window closed by user&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;KEYDOWN&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_ESCAPE&lt;/span&gt;:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# user pressed ESC&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_SPACE&lt;/span&gt;:
                loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# mausbewegung&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; == 1:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; ballx:
            dx-=30
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; ballx:
            dx+=30
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; bally:
            dy-=30
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; bally:
            dy+=30
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;2&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; == 1:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; quadratx:
            qx-=30
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; quadratx:
            qx+=30
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; quadraty:
            qy-=30
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; quadraty:
            qy+=30
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadratx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; ballx:
        dx-=40
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; quadratx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; ballx:
        dx+=40
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadraty &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; bally:
        dy-=40
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; quadraty &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; bally:
        dy+=40
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; quadratx:
        qx-=40
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; ballx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; quadratx:
        qx+=40
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; bally &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; quadraty:
        qy-=40
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; bally &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; quadraty:
        qy+=&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt;
&amp;nbsp;
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_caption&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Press Space to clean. %.2f frames per second&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; clock.&lt;span class=&quot;me1&quot;&gt;get_fps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# only blit the part of the background where the ball was (cleanrect)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#cleanrect = background.subsurface((ballx, bally, ball.get_width(), ball.get_height()))&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#screen.blit(cleanrect, (ballx, bally)) # comment out this line for a funny effect !&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#calculate new center of ball&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# time based movement. No matter how busy the cpu and how low the framerate,&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# movement speed will always be constant.&lt;/span&gt;
    ballx += dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    ballx = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    bally += dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    bally = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bally,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    quadratx += qx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    quadratx = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratx,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    quadraty += qy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    quadraty = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadraty,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# bounce ball if out of screen&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        ballx = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; ballx + ball.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ballx = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; bally &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        bally = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; bally + ball.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        bally = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadratx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        quadratx = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        qx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; quadratx + quadrat.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        quadratx = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - quadrat.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        qx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadraty &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        quadraty = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        qy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; quadraty + quadrat.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        quadraty = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - quadrat.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        qy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#tock.play()&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# speed limit    &lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; qy &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 200:
        qy=200
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; qy &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -200:
        qy=-200
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; qx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -200:
        qx=-200
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; qx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 200:
        qx=200
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; dy &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 1000:
        dy=1000
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; dy &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -1000:
        dy=-1000
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; dx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; -1000:
        dx=-1000
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; dx &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 1000:
        dx=1000
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; dist &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;:
        dx=&lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;
        qx=-&lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;
        dy=&lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;
        qy=-&lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#bump.play()&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;# paint the ball&lt;/span&gt;
    ballrot+=deltarot
    ballgruen+=deltagruen
    ballblau+=deltablau
&amp;nbsp;
    quadratrot+=quadratdeltarot
    quadratgruen+=quadratdeltagruen
    quadratblau+=quadratdeltablau
&amp;nbsp;
    ballrot,deltarot=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballrot,deltarot&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if ballrot &amp;gt; 255:&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#   ballrot=255&lt;/span&gt;
      &lt;span class=&quot;co1&quot;&gt;#  deltarot*=-1&lt;/span&gt;
    ballgruen,deltagruen=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballgruen,deltagruen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if ballgruen &amp;gt; 255:&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#   ballgruen=255&lt;/span&gt;
      &lt;span class=&quot;co1&quot;&gt;#  deltagruen*=-1&lt;/span&gt;
    ballblau,deltablau=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballblau,deltablau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if ballblau &amp;gt; 255:&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#   ballblau=255&lt;/span&gt;
      &lt;span class=&quot;co1&quot;&gt;#  deltablau*=-1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballrot &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ballrot=0
        deltarot=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballgruen &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ballgruen=0
        deltagruen=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballblau &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        ballblau=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        deltablau=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    quadratrot,quadratdeltarot=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratrot,quadratdeltarot&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if quadratrot &amp;gt; 255:&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#   quadratrot=255&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#deltarot*=-1&lt;/span&gt;
    quadratgruen,quadratdeltagruen=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratgruen,quadratdeltagruen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if quadratgruen &amp;gt; 255:&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#   quadratgruen=255&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#deltagruen*=-1&lt;/span&gt;
    quadratblau,quadratdeltablau=farbcheck&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratblau,quadratdeltablau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#if quadratblau &amp;gt; 255:&lt;/span&gt;
     &lt;span class=&quot;co1&quot;&gt;#   quadratblau=255&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#deltablau*=-1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadratrot &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        quadratrot=0
        deltarot=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadratgruen &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        quadratgruen=0
        deltagruen=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; quadratblau &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        quadratblau=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        deltablau=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;# more precise keyboard event handler&lt;/span&gt;
    pressed_keys = pygame.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_UP&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        qy-=100
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_DOWN&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        qy+=100
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_LEFT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        qx-=100
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_RIGHT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        qx+=100
&amp;nbsp;
    pressed_keys = pygame.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pressed&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_w&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        dy-=100
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_s&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        dy+=100
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_a&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        dx-=100
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pressed_keys&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;pygame.&lt;span class=&quot;me1&quot;&gt;K_d&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        dx+=&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;#if pygame.mouse.get_pressed()[0] == 1: # linke maustaste wurde gedrückt&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#breite +=0.2&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#elif pygame.mouse.get_pressed()[2] == 1: #rechte maustaste&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#breite -=0.2&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#breite = min(10,breite)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#breite = max(1,breite)&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;quadratrot %i quadratdgruen %i quadreatblau %i &amp;quot; % (quadratrot,quadratgruen,quadratblau)&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballrot,ballgruen,ballblau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadrat, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratrot,quadratgruen,quadratblau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadrat, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratx, quadraty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx, bally&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#print &amp;quot;quadratrot %i quadratdgruen %i quadreatblau %i   ballrot %i ballgruen %i ballblau %i mixrot %i mixgruen %i mixblau %i &amp;quot; % (quadratrot,quadratgruen,quadratblau, ballrot, ballgruen, ballblau, (ballrot+quadratrot)/2, (ballgruen+quadratgruen)/2, (ballblau+quadratblau)/2)&lt;/span&gt;
    linienfarbe=&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballgruen,quadratgruen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballrot,quadratgruen,linienfarbe&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0,1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx+25,bally+25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;quadratx+25,quadraty+25&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, breite&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    distx=&lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx,quadratx&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx,quadratx&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    disty=&lt;span class=&quot;kw2&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bally,quadraty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;kw2&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bally,quadraty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dist = &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;distx&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;distx + disty&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;disty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#print&amp;quot;distx %i disty %i dist %i&amp;quot; % (distx,disty,dist)&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;# flip the screen 30 times a second&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Code&quot; [22343-31969] --&gt;
&lt;h3&gt;&lt;a name=&quot;ein_ball_der_rumspringt&quot; id=&quot;ein_ball_der_rumspringt&quot;&gt;Ein Ball der rumspringt&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
ist eigentlich nur eine frühere Version des Hirnschoners

&lt;/p&gt;
&lt;pre class=&quot;code Python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;bouncing ball
markus hauser 2009
&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; pygame
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;randint&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
pygame.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
screen=pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_mode&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;480&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# try out larger values and see what happens !&lt;/span&gt;
background = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;screen.&lt;span class=&quot;me1&quot;&gt;get_size&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
background.&lt;span class=&quot;me1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#fill the background white (red,green,blue)&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;300&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;250&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# draw a circle on the background&lt;/span&gt;
background = background.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ball = pygame.&lt;span class=&quot;me1&quot;&gt;Surface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#create a new surface&lt;/span&gt;
ball.&lt;span class=&quot;me1&quot;&gt;set_colorkey&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;         &lt;span class=&quot;co1&quot;&gt;#make black the transparent color (red,green,blue)&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;#pygame.draw.circle(Surface, color, pos, radius, width=0): return Rect&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ballrot=&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;
ballgruen=&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;
ballblau=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
deltarot = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
deltagruen = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
deltablau = neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballrot,ballgruen,ballblau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# paint blue circle&lt;/span&gt;
ball = ball.&lt;span class=&quot;me1&quot;&gt;convert&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ballx = &lt;span class=&quot;nu0&quot;&gt;550&lt;/span&gt;
bally = &lt;span class=&quot;nu0&quot;&gt;240&lt;/span&gt;
dx = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pixel per second !&lt;/span&gt;
dy = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pixel per second !&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;background, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     &lt;span class=&quot;co1&quot;&gt;#draw background on screen (overwriting all)&lt;/span&gt;
screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx, bally&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;#draw the ball shape&lt;/span&gt;
clock = pygame.&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Clock&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
mainloop = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
FPS = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# desired framerate in frames per second.&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; mainloop:
    &lt;span class=&quot;co1&quot;&gt;# do all this each frame&lt;/span&gt;
    milliseconds = clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;# milliseconds passed since last frame&lt;/span&gt;
    seconds = milliseconds / &lt;span class=&quot;nu0&quot;&gt;1000.0&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# seconds passed since last frame&lt;/span&gt;
    clock.&lt;span class=&quot;me1&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;FPS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# do not go faster than this framerate&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; event &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;QUIT&lt;/span&gt;:
            mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# pygame window closed by user&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; event.&lt;span class=&quot;kw2&quot;&gt;type&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;KEYDOWN&lt;/span&gt;:
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; event.&lt;span class=&quot;me1&quot;&gt;key&lt;/span&gt; == pygame.&lt;span class=&quot;me1&quot;&gt;K_ESCAPE&lt;/span&gt;:
                mainloop = &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# user pressed ESC&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; ballx:
        dx-=50
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; ballx:
        dx+=50
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; bally:
        dy-=50
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; pygame.&lt;span class=&quot;me1&quot;&gt;mouse&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;get_pos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; bally:
        dy+=&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;    
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;set_caption&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;pygame is running with %.2f frames per second&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; clock.&lt;span class=&quot;me1&quot;&gt;get_fps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# only blit the part of the background where the ball was (cleanrect)&lt;/span&gt;
    cleanrect = background.&lt;span class=&quot;me1&quot;&gt;subsurface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx, bally, ball.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, ball.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#screen.blit(cleanrect, (ballx, bally)) # comment out this line for a funny effect !&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;#calculate new center of ball&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# time based movement. No matter how busy the cpu and how low the framerate,&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# movement speed will always be constant.&lt;/span&gt;
    ballx += dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    ballx = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx,0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    bally += dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; seconds
    bally = &lt;span class=&quot;kw2&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bally,&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# bounce ball if out of screen&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballx &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ballx = 0
        dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
        loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; ballx + ball.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        ballx = screen.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball.&lt;span class=&quot;me1&quot;&gt;get_width&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dx &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
        loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; bally &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        bally = 0
        dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -1
        loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; bally + ball.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        bally = screen.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; - ball.&lt;span class=&quot;me1&quot;&gt;get_height&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        dy &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;= -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        loesch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# paint the ball&lt;/span&gt;
    ballrot+=deltarot
    ballgruen+=deltagruen
    ballblau+=deltablau
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballrot &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 255:
        ballrot=255
        deltarot&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;=-1
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballgruen &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 255:
        ballgruen=255
        deltagruen&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;=-1
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballblau &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; 255:
        ballblau=255
        deltablau&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;=-1
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballrot &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ballrot=0
        deltarot=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballgruen &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; 0:
        ballgruen=0
        deltagruen=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; ballblau &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        ballblau=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        deltablau=neudelta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    pygame.&lt;span class=&quot;me1&quot;&gt;draw&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;circle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballrot,ballgruen,ballblau&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    screen.&lt;span class=&quot;me1&quot;&gt;blit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ball, &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ballx, bally&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pygame.&lt;span class=&quot;me1&quot;&gt;display&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;flip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;# flip the screen 30 times a second&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Ein Ball der rumspringt&quot; [31970-] --&gt;</description>
            <author>Horst JENS</author>
        <category>de:personen:markus</category>
            <pubDate>Fri, 26 Feb 2010 20:12:23 +0100</pubDate>
        </item>
        <item>
            <title>Kurszeiten &amp; Preise</title>
            <link>http://www.spielend-programmieren.at/wiki/doku.php?id=de:kursdetails</link>
            <description>


&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/detail.php?id=de%3Akursdetails&amp;amp;media=homepage-kursdetails.png&quot; class=&quot;media&quot; target=&quot;_parent&quot; title=&quot;homepage-kursdetails.png&quot;&gt;&lt;img src=&quot;http://www.spielend-programmieren.at/wiki/lib/exe/fetch.php?media=homepage-kursdetails.png&quot; class=&quot;mediacenter&quot; title=&quot;Grafik Kursdetails&quot; alt=&quot;Grafik Kursdetails&quot; /&gt;&lt;/a&gt;
Prinzipiell gilt:
&lt;/p&gt;

&lt;p&gt;
Der laufende Programmier-Unterricht findet &lt;strong&gt;während der Schulzeit nachmittags&lt;/strong&gt; statt,&lt;br/&gt;

&lt;strong&gt;Intensiv-Kurse&lt;/strong&gt; während der &lt;strong&gt;Schulferien&lt;/strong&gt; finden immer &lt;strong&gt;vormittags&lt;/strong&gt; statt. Sofern nicht anders vereinbart finden alle Kurse im &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kontakt&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kontakt&quot;&gt;Büro JENS&lt;/a&gt; statt.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Kurszeiten &amp; Preise&quot; [1-363] --&gt;
&lt;h3&gt;&lt;a name=&quot;schnuppertermine&quot; id=&quot;schnuppertermine&quot;&gt;Schnuppertermine&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Alle Schnuppertermine sind kostenlos und unverbindlich. Einen kostenlosen, unverbindlichen Schnuppertertermin (eine Stunde) gibt es für jede(n) Interessierte(n):

&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Termin: nach Vereinbarung.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Kosten: kostenlos &amp;amp; unverbindlich&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Anmeldung: &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kontakt&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kontakt&quot;&gt;telefonische Anmeldung&lt;/a&gt; ist erforderlich.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Schnuppertermine&quot; [364-695] --&gt;
&lt;h3&gt;&lt;a name=&quot;laufender_unterricht&quot; id=&quot;laufender_unterricht&quot;&gt;Laufender Unterricht&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Während der Schulzeit (Wien), mind. 2 Stunden pro Woche
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Termine: Montag bis Freitag, Nachmittags, 16:00 bis 18:00 oder 18:00 bis 20:00&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Während der &lt;a href=&quot;http://www.schulferien.org/Ferien_Oesterreich/Schulferien_Wien.html&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.schulferien.org/Ferien_Oesterreich/Schulferien_Wien.html&quot;  rel=&quot;nofollow&quot;&gt;Wiener Schulferien&lt;/a&gt; kein laufender Unterricht. Siehe auch &lt;a href=&quot;#intensiv-kurs&quot; title=&quot;de:kursdetails &amp;crarr;&quot; class=&quot;wikilink1&quot;&gt;Intensivkurs&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Kosten: 12,-€ pro Stunde. Monatliche Vorauszahlung erforderlich. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Anmeldung: Einstieg jederzeit möglich, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kontakt&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kontakt&quot;&gt;Anmeldung&lt;/a&gt; (Email oder telefonisch) erforderlich&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Kursdauer: siehe &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:faq#wie_lange_brauche_ich_bis_ich_programmieren_kann&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:faq&quot;&gt;f.a.q.&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Laufender Unterricht&quot; [696-1313] --&gt;
&lt;h4&gt;&lt;a name=&quot;stundenplan&quot; id=&quot;stundenplan&quot;&gt;Stundenplan&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
an folgenden Wochentagen finden während der Schulzeit Programmierkurse statt:

&lt;/p&gt;
&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;th class=&quot;col0 centeralign&quot;&gt;  Zeit \ Wochentag  &lt;/th&gt;&lt;th class=&quot;col1 centeralign&quot;&gt;  Mo  &lt;/th&gt;&lt;th class=&quot;col2 centeralign&quot;&gt;  Di  &lt;/th&gt;&lt;th class=&quot;col3 centeralign&quot;&gt;  Mi  &lt;/th&gt;&lt;th class=&quot;col4 centeralign&quot;&gt;  Do  &lt;/th&gt;&lt;th class=&quot;col5 centeralign&quot;&gt;  Fr  &lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; 09:00 - 12:00 &lt;/td&gt;&lt;td class=&quot;col1 centeralign&quot;&gt;  F  &lt;/td&gt;&lt;td class=&quot;col2 centeralign&quot;&gt;  F  &lt;/td&gt;&lt;td class=&quot;col3 centeralign&quot;&gt;  F  &lt;/td&gt;&lt;td class=&quot;col4 centeralign&quot;&gt;  F  &lt;/td&gt;&lt;td class=&quot;col5 centeralign&quot;&gt;  F  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; 13:00 - 15:00 &lt;/td&gt;&lt;td class=&quot;col1 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col2 centeralign&quot;&gt;  k  &lt;/td&gt;&lt;td class=&quot;col3 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col4 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col5 centeralign&quot;&gt;  -  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row3&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; 16:00 - 18:00 &lt;/td&gt;&lt;td class=&quot;col1 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col2 centeralign&quot;&gt;  k  &lt;/td&gt;&lt;td class=&quot;col3 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col4 centeralign&quot;&gt;  k  &lt;/td&gt;&lt;td class=&quot;col5 centeralign&quot;&gt;  -  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row4&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; 18:00 - 20:00 &lt;/td&gt;&lt;td class=&quot;col1 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col2 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col3 centeralign&quot;&gt;  -  &lt;/td&gt;&lt;td class=&quot;col4 centeralign&quot;&gt;  k  &lt;/td&gt;&lt;td class=&quot;col5 centeralign&quot;&gt;  -  &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;
Legende:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; F: Nur während der &lt;a href=&quot;http://www.schulferien.org/Ferien_Oesterreich/Schulferien_Wien.html&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.schulferien.org/Ferien_Oesterreich/Schulferien_Wien.html&quot;  rel=&quot;nofollow&quot;&gt;Ferien&lt;/a&gt; möglich, siehe &lt;a href=&quot;#intensiv-kurs&quot; title=&quot;de:kursdetails &amp;crarr;&quot; class=&quot;wikilink1&quot;&gt;Intensiv-Kurs&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; -: Dieser Termin (während der Schulzeit) ist noch frei. Einstieg möglich, allerdings zur Zeit Einzelunterricht.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; k: Kurs (während der Schulzeit) läuft, Einstieg möglich da noch Plätze frei sind.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; X: Kurs (während der Schulzeit) ist ausgebucht, Einstieg zur Zeit nicht möglich. &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Stundenplan&quot; [1314-2110] --&gt;
&lt;h3&gt;&lt;a name=&quot;intensiv-kurs&quot; id=&quot;intensiv-kurs&quot;&gt;Intensiv-Kurs&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Nur an &lt;a href=&quot;http://www.schulferien.org/Ferien_Oesterreich/Schulferien_Wien.html&quot; class=&quot;urlextern&quot; target=&quot;_parent&quot; title=&quot;http://www.schulferien.org/Ferien_Oesterreich/Schulferien_Wien.html&quot;  rel=&quot;nofollow&quot;&gt;schulfreien Tagen&lt;/a&gt; möglich, 
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Zeiten: 3 Stunden pro Tag, jeweils vormittags, 9:00 bis 12:00&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Kosten:  € 12,- pro Stunde (x 3 Stunden pro Tag = € 36,- pro Tag). Vorauszahlung für den ganzen Kurs erforderlich,   &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Anmeldung: Einstieg zu Kursbeginn möglich, &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kontakt&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kontakt&quot;&gt;Anmeldung&lt;/a&gt; (Email oder telefonisch) erforderlich&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;

Für Fragen betreffend Fernunterricht, Schulungen vor Ort oder Terminwünsche kontaktieren Sie bitte &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kontakt&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kontakt&quot;&gt;Horst JENS&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Intensiv-Kurs&quot; [2111-2967] --&gt;
&lt;h4&gt;&lt;a name=&quot;kurs_buchen&quot; id=&quot;kurs_buchen&quot;&gt;Kurs buchen&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
Einfach eine &lt;a href=&quot;mailto:&amp;#x6d;&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#x74;&amp;#x6f;&amp;#x3a;&amp;#x68;&amp;#x6f;&amp;#x72;&amp;#x73;&amp;#x74;&amp;#x2e;&amp;#x6a;&amp;#x65;&amp;#x6e;&amp;#x73;&amp;#x40;&amp;#x73;&amp;#x70;&amp;#x69;&amp;#x65;&amp;#x6c;&amp;#x65;&amp;#x6e;&amp;#x64;&amp;#x2d;&amp;#x70;&amp;#x72;&amp;#x6f;&amp;#x67;&amp;#x72;&amp;#x61;&amp;#x6d;&amp;#x6d;&amp;#x69;&amp;#x65;&amp;#x72;&amp;#x65;&amp;#x6e;&amp;#x2e;&amp;#x61;&amp;#x74;&amp;#x3f;&amp;#x73;&amp;#x75;&amp;#x62;&amp;#x6a;&amp;#x65;&amp;#x63;&amp;#x74;&amp;#x3d;&amp;#x4b;&amp;#x75;&amp;#x72;&amp;#x73;&amp;#x62;&amp;#x75;&amp;#x63;&amp;#x68;&amp;#x75;&amp;#x6e;&amp;#x67;&quot; class=&quot;mail JSnocheck&quot; title=&quot;&amp;#x6d;&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#x74;&amp;#x6f;&amp;#x3a;&amp;#x68;&amp;#x6f;&amp;#x72;&amp;#x73;&amp;#x74;&amp;#x2e;&amp;#x6a;&amp;#x65;&amp;#x6e;&amp;#x73;&amp;#x40;&amp;#x73;&amp;#x70;&amp;#x69;&amp;#x65;&amp;#x6c;&amp;#x65;&amp;#x6e;&amp;#x64;&amp;#x2d;&amp;#x70;&amp;#x72;&amp;#x6f;&amp;#x67;&amp;#x72;&amp;#x61;&amp;#x6d;&amp;#x6d;&amp;#x69;&amp;#x65;&amp;#x72;&amp;#x65;&amp;#x6e;&amp;#x2e;&amp;#x61;&amp;#x74;&amp;#x3f;&amp;#x73;&amp;#x75;&amp;#x62;&amp;#x6a;&amp;#x65;&amp;#x63;&amp;#x74;&amp;#x3d;&amp;#x4b;&amp;#x75;&amp;#x72;&amp;#x73;&amp;#x62;&amp;#x75;&amp;#x63;&amp;#x68;&amp;#x75;&amp;#x6e;&amp;#x67;&quot;&gt;Email an horst.jens@spielend-programmieren.at&lt;/a&gt; schreiben oder &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kontakt&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kontakt&quot;&gt;anrufen&lt;/a&gt;. Sie bekommen einen Erlagschein per Post geschickt.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Kurs buchen&quot; [2968-3205] --&gt;
&lt;h2&gt;&lt;a name=&quot;veranstaltungen&quot; id=&quot;veranstaltungen&quot;&gt;Veranstaltungen&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Unabhängig von den Programmierkursen empfehle ich Ihnen eine dieser zahlreichen meist kostenlosen Veranstaltungen (Messen, Vorträge, Workshops) zu besuchen: Werfen Sie einen Blick auf die Seite &lt;a href=&quot;http://www.spielend-programmieren.at/wiki/doku.php?id=de:kalender&quot; class=&quot;wikilink1&quot; target=&quot;_parent&quot; title=&quot;de:kalender&quot;&gt;Veranstaltungskalender&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Veranstaltungen&quot; [3206-] --&gt;</description>
            <author>Horst JENS</author>
        <category>de</category>
            <pubDate>Mon, 22 Feb 2010 07:44:32 +0100</pubDate>
        </item>
    </channel>
</rss>
