<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/kiki/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/kiki/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/kiki/bugs/</id><updated>2012-12-26T14:37:49.352000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Level Core iterate on float values</title><link href="https://sourceforge.net/p/kiki/bugs/20/" rel="alternate"/><published>2012-12-26T14:37:49.352000Z</published><updated>2012-12-26T14:37:49.352000Z</updated><author><name>Bbp</name><uri>https://sourceforge.net/u/bigblackpapa/</uri></author><id>https://sourceforge.net7092d7ff5f843e53c84fc8844359c3ccaf881a22</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The level No 35 - &lt;strong&gt;Core&lt;/strong&gt; (version 1.0.0 found on Ubuntu repositories) as 3 "for" loops that iterate on &lt;em&gt;float&lt;/em&gt; values instead of &lt;em&gt;integer&lt;/em&gt;, in the create attribute of the level creation (file py/levels/core.py). My knowledge of python is not that good, but I think the programmer was trying to achieve the following:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getSize&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
            &lt;span class="n"&gt;world&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addObjectAtPos&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;KikiStone&lt;/span&gt; &lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decenter&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; the values in the "for" loops are cast to &lt;em&gt;int&lt;/em&gt; before iteration. As long as I know, "for" loops can not iterate on &lt;em&gt;floats&lt;/em&gt;, even if the value round to a &lt;em&gt;int&lt;/em&gt; (2.0 is not a &lt;em&gt;int&lt;/em&gt;).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/19/" rel="alternate"/><published>2012-09-17T16:09:54.478000Z</published><updated>2012-09-17T16:09:54.478000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.netbbe3e3e5d4b1c7b4438073d4547f64202a7c40de</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/18/" rel="alternate"/><published>2012-09-17T16:09:54.428000Z</published><updated>2012-09-17T16:09:54.428000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net806f00a74d2dcbe06b843f338450eea204f45ab5</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/17/" rel="alternate"/><published>2012-09-17T16:09:54.129000Z</published><updated>2012-09-17T16:09:54.129000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net2d655e16bf5232c482d559508c7659d26d5e3766</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/16/" rel="alternate"/><published>2012-09-17T16:09:54.036000Z</published><updated>2012-09-17T16:09:54.036000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net67aa31afe0cb86a6f475c90a8b10ed016f509783</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/15/" rel="alternate"/><published>2012-09-17T16:09:53.971000Z</published><updated>2012-09-17T16:09:53.971000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.netb698d4b4186b98a70b1be4da08da77dc4040bc19</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/14/" rel="alternate"/><published>2012-09-17T16:09:53.803000Z</published><updated>2012-09-17T16:09:53.803000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net1e3c5c3de86cee69857d4f96b346238c4718c107</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/13/" rel="alternate"/><published>2012-09-17T16:09:47.275000Z</published><updated>2012-09-17T16:09:47.275000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net85fc545633b25989942ca4d5a9862fba1d216bc5</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/12/" rel="alternate"/><published>2012-09-17T16:09:42.352000Z</published><updated>2012-09-17T16:09:42.352000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net15a47e58a19fd937bb7c84d4d0cf957ae9d2cf16</id><summary type="html"/></entry><entry><title/><link href="https://sourceforge.net/p/kiki/bugs/11/" rel="alternate"/><published>2012-09-17T16:09:39.146000Z</published><updated>2012-09-17T16:09:39.146000Z</updated><author><name>Thorsten Kohnhorst</name><uri>https://sourceforge.net/u/monsterkodi/</uri></author><id>https://sourceforge.net0cbf8f63f308cfd71606cf7b53ff87a0bb23a562</id><summary type="html"/></entry></feed>