<?xml-stylesheet type="text/xsl" href="http://redgloo.sse.reading.ac.uk/jy008108/weblog/rss/rssstyles.xsl"?>
<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'>
    <channel xml:base='http://redgloo.sse.reading.ac.uk/jy008108/weblog/'>
        <title><![CDATA[Peter Ashworth : Weblog]]></title>
        <description><![CDATA[The weblog for Peter Ashworth, hosted on RedGloo.]]></description>
        <generator>Elgg</generator>
        <link>http://redgloo.sse.reading.ac.uk/jy008108/weblog/</link>        
        <item>
            <title><![CDATA[Review of card game]]></title>
            <link>http://redgloo.sse.reading.ac.uk/jy008108/weblog/3784.html</link>
            <guid isPermaLink="true">http://redgloo.sse.reading.ac.uk/jy008108/weblog/3784.html</guid>
            <pubDate>Tue, 16 Mar 2010 23:24:39 GMT</pubDate>
            <description><![CDATA[<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%;">This project was useful to me in my overall implementation of C. It has taught me some things and also revised things for me, giving me a better sounding in programming C.</span></p><br />
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%;">For instance to make a truly random number it is useful to use srand with the time which uses the computer&rsquo;s internal clock every time a number is generated to make it truly random. Otherwise you get random numbers but if you use it multiple times you get the same random numbers. Also weaving arrays together so they keep track of what has been played and what hasn&rsquo;t.</span></p><br />
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%;">The amount of error checking and flow control needed to control the Computers turn and to know if a player had gone bust was certainly interesting and educational to implement. It required a logical outlook to make sure you covered every hole, and to make sure the game called functions in the right order.</span></p><br />
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%;">Testing the code was certainly an eye opener. For something that you thought was a reasonably sound piece of code. In can go wrong in numerous little places that cause infinite loops or just crashing in general. This was usually somewhere in the computer AI which meant it didn&rsquo;t want to stand but didn&rsquo;t want to hit either. This has certainly helped my error checking skills in that I now know where likely failures are going to be caused.</span></p><br />
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%;">Overall it was a fun little project and I will probably continue to add to it in the future to keep my practice up. I will probably enter some form of betting system and also probably change it into c ++ as well and look into incorporating classes.</span></p><br />
<p>&nbsp;</p>]]></description>
        </item>
        
    </channel>
</rss>