<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Homework</title>
		<link>http://gamedesign.wikidot.com/forum/t-10407/homework</link>
		<description>Posts in the discussion thread &quot;Homework&quot; - For Monday the 28&#039;th May.</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 14 Jun 2026 23:16:55 +0000</lastBuildDate>
		
					<item>
				<guid>http://gamedesign.wikidot.com/forum/t-10407#post-25751</guid>
				<title>Homework</title>
				<link>http://gamedesign.wikidot.com/forum/t-10407/homework#post-25751</link>
				<description></description>
				<pubDate>Sat, 26 May 2007 21:07:54 +0000</pubDate>
				<wikidot:authorName>Gosha</wikidot:authorName>				<wikidot:authorUserId>19971</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here's one way of doing it. since the class seemed to be about types I used a type. XD</p> <div class="code"> <pre><code>Option Explicit Randomize Timer screen 17 'screenres 640,480,24,1,1 Type charTP nm As String ' name ra As String ' race cl As String ' class hp As Integer ' hit points mh As Integer ' max hit points mp As Integer ' magic points mm As Integer ' max magic points st As Integer ' strength dx As Integer ' dexterity it As Integer ' intelligence End Type Type extraPT mh As Integer ' max hit points mp As Integer ' magic points mm As Integer ' max magic points st As Integer ' strength dx As Integer ' dexterity it As Integer ' intelligence End type Type extraSAY mh As String ' max hit points mp As String ' magic points mm As String ' max magic points st As String ' strength dx As String ' dexterity it As String ' intelligence End type Dim extra As extraPT Dim player As charTP Dim say as extraSAY Dim choice As String Do Cls Print &quot;Character Generation&quot; : Print Print &quot;What is your name?&quot; Input &quot; &gt; &quot;, choice Loop Until len(choice) &gt; 0 player.nm = choice Do Cls Print &quot;Character Generation&quot; : Print Print &quot;Name : &quot; ; player.nm : Print Print &quot;1. Human.&quot; Print &quot;2. Elf.&quot; Print &quot;3. Dwarf.&quot; Print : Print &quot;Pick a race : ( 1 to 3 )&quot; Input &quot; &gt; &quot;, choice Loop Until choice &gt;= &quot;1&quot; And choice &lt;= &quot;3&quot; If choice = &quot;1&quot; Then player.ra = &quot;Human&quot; extra.mh = 0 extra.mm = 0 extra.st = 2 extra.it = 2 extra.dx = 2 endif If choice = &quot;2&quot; Then player.ra = &quot;Elf&quot; extra.mh = 0 extra.mm = 0 extra.st = 0 extra.it = 3 extra.dx = 3 endif If choice = &quot;3&quot; Then player.ra = &quot;Dwarf&quot; extra.mh = 1 extra.mm = 2 extra.st = 3 extra.it = 0 extra.dx = 0 endif Do Cls Print &quot;Character Generation&quot; : Print Print &quot;Name : &quot; ; player.nm Print &quot;Race : &quot; ; player.ra : Print Print &quot;1. Fighter.&quot; Print &quot;2. Mage.&quot; Print &quot;3. Thief.&quot; Print : Print &quot;Pick a class : ( 1 to 3 )&quot; Input &quot; &gt; &quot;, choice Loop Until choice &gt;= &quot;1&quot; And choice &lt;= &quot;3&quot; If choice = &quot;1&quot; Then player.cl = &quot;Fighter&quot; extra.mh += 3 extra.mm += 1 extra.st += 4 extra.it += 1 extra.dx += 2 endif If choice = &quot;2&quot; Then player.cl = &quot;Mage&quot; extra.mh += 1 extra.mm += 4 extra.st += 1 extra.it += 3 extra.dx+ = 2 endif If choice = &quot;3&quot; Then player.cl = &quot;Thief&quot; extra.mh += 1 extra.mm += 2 extra.st += 2 extra.it += 2 extra.dx += 4 endif Do player.mh = Int(Rnd(1)*20)+20 player.mm = Int(Rnd(1)*20)+20 player.st = Int(Rnd(1)*20)+20 player.it = Int(Rnd(1)*20)+20 player.dx = Int(Rnd(1)*20)+20 Cls Print &quot;Character Generation&quot; : Print Print &quot;Name : &quot; ; player.nm Print &quot;Race : &quot; ; player.ra Print &quot;Class : &quot; ; player.cl : Print Print &quot;Your stats are :&quot; Print &quot;Hit Points : &quot; ; player.mh; &quot; +&quot;;extra.mh; &quot;(&quot;; player.mh + extra.mh; &quot; )&quot; Print &quot;Magic Points : &quot; ; player.mm; &quot; +&quot;;extra.mm; &quot;(&quot;; player.mm + extra.mm; &quot; )&quot; Print &quot;Strength : &quot; ; player.st; &quot; +&quot;;extra.st; &quot;(&quot;; player.st + extra.st; &quot; )&quot; Print &quot;Dexterity : &quot; ; player.dx; &quot; +&quot;;extra.dx; &quot;(&quot;; player.dx + extra.dx; &quot; )&quot; Print &quot;Intelligence : &quot; ; player.it; &quot; +&quot;;extra.it; &quot;(&quot;; player.it + extra.it; &quot; )&quot; Print : Print &quot;Press a key to re-roll.&quot; Print &quot;Press k to keep.&quot; Input &quot; &gt; &quot;, choice Loop Until LCase(choice) = &quot;k&quot; player.mh += extra.mh player.mm += extra.mm player.st += extra.st player.it += extra.it player.dx += extra.dx Cls Sleep 1000, 1 ? &quot;&quot; ? &quot;Prepare to enter the dungeon.&quot; ? &quot;&quot; Sleep 1500, 1 ? &quot; Thanks for trying this sample.&quot; sleep 2000, 1 ? &quot;&quot; ? &quot; Perhaps this will become a game, who knows.&quot; sleep 2500, 1 ? &quot;&quot; ? &quot; See you, hehe.&quot; sleep 1500, 1 ? &quot; Press a key to exit.&quot; while inkey = &quot;&quot;:wend End</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>