<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C7F976.AC50C4A0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;
        mso-font-charset:2;
        mso-generic-font-family:auto;
        mso-font-pitch:variable;
        mso-font-signature:0 268435456 0 0 -2147483648 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.StylZprvyElektronickPoty17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Normální tabulka";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=CS link=blue vlink=purple style='tab-interval:35.4pt'>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Tak změna,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Blbe jsem to popsal a tady mam ten <span class=SpellE>kod</span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'># -*- <span class=SpellE>coding</span>: cp1250 -*-<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'># import a inicializace<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>import <span class=SpellE>pygame</span>, <span class=SpellE>sys</span><o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>from</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> <span
class=SpellE>pygame</span>.<span class=SpellE>locals</span> import *<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>pygame</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>.<span
class=SpellE>init</span>()<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'># nastavení konstant<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>REZIM=(640, 480)<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>umisteniObrazku</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>=(0,0)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>obrazovka = <span class=SpellE>pygame</span>.display.set_mode(REZIM)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>hrdina = <span class=SpellE>pygame</span>.<span
class=SpellE>image</span>.<span class=SpellE>load</span>('<span class=SpellE>mic</span>.<span
class=SpellE>gif</span>').<span class=SpellE>convert</span>() #načtení obrázku<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>pozadi</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> = <span
class=SpellE>pygame</span>.<span class=SpellE>image</span>.<span class=SpellE>load</span>('<span
class=SpellE>lava</span>.<span class=SpellE>bmp</span>').<span class=SpellE>convert</span>()
#načtení obrázku<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>obrazovka.blit(<span class=SpellE>pozadi</span>, <span
class=SpellE>umisteniObrazku</span>) # <span class=SpellE>vykreselení</span> na
<span class=SpellE>obrazovkku</span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>#obrazovka.blit(hrdina, <span class=SpellE>umisteniObrazku</span>)<span
style='mso-spacerun:yes'>  </span><span class=SpellE>vykreselení</span> na <span
class=SpellE>obrazovkku</span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>pokracovat</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>=1<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>while</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> <span
class=SpellE>pokracovat</span>:<span style='mso-spacerun:yes'>                
</span># téměř do nekonečna<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>   </span>for x in <span
class=SpellE>range</span>(100):<span
style='mso-spacerun:yes'>                      </span>#animace 100 snímků<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span>kurzor = <span
class=SpellE>pygame</span>.<span class=SpellE>mouse</span>.<span class=SpellE>get</span>_<span
class=SpellE>rel</span>() # <span class=SpellE>return</span> (x, y)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span>pozice = hrdina.<span
class=SpellE>get</span>_<span class=SpellE>rect</span>(center=kurzor)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span>pozice = pozice.<span
class=SpellE>move</span>(kurzor)<span style='mso-spacerun:yes'>            
</span>#posuň hrdinu<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span>obrazovka.blit(<span
class=SpellE>pozadi</span>, pozice, pozice) #vymazat<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>   
</span>obrazovka.blit(hrdina, pozice)<span style='mso-spacerun:yes'>        
</span>#vykresli nového hrdinu<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span><span
class=SpellE>pygame</span>.display.update()<span
style='mso-spacerun:yes'>                </span>#vše to ukaž<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>    </span><span
class=SpellE>pygame</span>.<span class=SpellE>time</span>.<span class=SpellE>delay</span>(1)<span
style='mso-spacerun:yes'>                 </span>#zastav program na 1/10
sekundy<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>   </span>for <span
class=SpellE>udalost</span> in <span class=SpellE>pygame</span>.<span
class=SpellE>event</span>.<span class=SpellE>get</span>():<span
style='mso-spacerun:yes'>  </span># o tomto více v tutoriálu<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>      </span><span
class=SpellE>if</span> <span class=SpellE>udalost</span>.type ==QUIT:<span
style='mso-spacerun:yes'>          </span># ošetření Alt+F4<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>           </span><span
class=SpellE>pokracovat</span>=0<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>   </span><span class=SpellE>pygame</span>.display.update()<span
style='mso-spacerun:yes'>          </span># aktualizace obrazovky<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>   </span><span class=SpellE>pygame</span>.<span
class=SpellE>time</span>.<span class=SpellE>delay</span>(100)<span
style='mso-spacerun:yes'>           </span># cekej<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>pygame</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>.<span
class=SpellE>quit</span>()<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>print</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> &quot;Ted
jsi <span class=SpellE>zavrel</span> okno. A to je <span class=SpellE>vse</span>
:-)&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>problem</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> je v&nbsp;tom,
ze hrdina nemizí. Zkouším nový věci a tenhle modul mě opravdu <span
class=SpellE>zaujmul</span></span></font><font size=2 face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings;mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;mso-char-type:symbol;
mso-symbol-font-family:Wingdings'><span style='mso-char-type:symbol;mso-symbol-font-family:
Wingdings'>J</span></span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> Jsem <span class=SpellE>total</span>
<span class=SpellE>looser</span> a snažil jsem se to okopírovat z&nbsp;tutoriálů
jak jen nejlíp jsem mohl. Díky moc<o:p></o:p></span></font></p>

</div>

</body>

</html>