<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.paulbui.net/wiki/index.php?action=history&amp;feed=atom&amp;title=RoomTest.py</id>
	<title>RoomTest.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.paulbui.net/wiki/index.php?action=history&amp;feed=atom&amp;title=RoomTest.py"/>
	<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=RoomTest.py&amp;action=history"/>
	<updated>2026-11-01T15:04:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.8</generator>
	<entry>
		<id>https://www.paulbui.net/wiki/index.php?title=RoomTest.py&amp;diff=10216&amp;oldid=prev</id>
		<title>Admin at 17:27, 6 May 2013</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=RoomTest.py&amp;diff=10216&amp;oldid=prev"/>
		<updated>2013-05-06T17:27:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:27, 6 May 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;syntaxhighlight lang=&amp;quot;Python&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from room import *&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from room import *&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l99&quot; &gt;Line 99:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; else:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; else:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; currentRoom = newRoom&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; currentRoom = newRoom&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://www.paulbui.net/wiki/index.php?title=RoomTest.py&amp;diff=10215&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;from room import *  # Constants: WARRIOR_HP = 50 WARRIOR_STR = 10 WARRIOR_SKILL = 15 WARRIOR_AC = 5 WARRIOR_NAME = &quot;Gnusto Frotz&quot; WARRIOR_TYPE = &quot;valiant warrior&quot; WARRIOR_PRONOUN...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=RoomTest.py&amp;diff=10215&amp;oldid=prev"/>
		<updated>2013-05-06T17:27:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;from room import *  # Constants: WARRIOR_HP = 50 WARRIOR_STR = 10 WARRIOR_SKILL = 15 WARRIOR_AC = 5 WARRIOR_NAME = &amp;quot;Gnusto Frotz&amp;quot; WARRIOR_TYPE = &amp;quot;valiant warrior&amp;quot; WARRIOR_PRONOUN...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;from room import *&lt;br /&gt;
&lt;br /&gt;
# Constants:&lt;br /&gt;
WARRIOR_HP = 50&lt;br /&gt;
WARRIOR_STR = 10&lt;br /&gt;
WARRIOR_SKILL = 15&lt;br /&gt;
WARRIOR_AC = 5&lt;br /&gt;
WARRIOR_NAME = &amp;quot;Gnusto Frotz&amp;quot;&lt;br /&gt;
WARRIOR_TYPE = &amp;quot;valiant warrior&amp;quot;&lt;br /&gt;
WARRIOR_PRONOUN = &amp;quot;his&amp;quot;&lt;br /&gt;
&lt;br /&gt;
MONSTER_HP = 50&lt;br /&gt;
MONSTER_STR = 15&lt;br /&gt;
MONSTER_SKILL = 10&lt;br /&gt;
MONSTER_AC = 7&lt;br /&gt;
MONSTER_NAME = &amp;quot;Schmoo&amp;quot;&lt;br /&gt;
MONSTER_TYPE = &amp;quot;gruesome ghost&amp;quot;&lt;br /&gt;
MONSTER_PRONOUN = &amp;quot;its&amp;quot;&lt;br /&gt;
&lt;br /&gt;
GRUE_HP             = 100&lt;br /&gt;
GRUE_STR             = 20&lt;br /&gt;
GRUE_SKILL         = 15&lt;br /&gt;
GRUE_AC             = 10&lt;br /&gt;
GRUE_NAME         = &amp;quot;Grue&amp;quot;&lt;br /&gt;
GRUE_TYPE         = &amp;quot;boss ghost&amp;quot;&lt;br /&gt;
GRUE_PRONOUN    = &amp;quot;his&amp;quot;&lt;br /&gt;
&lt;br /&gt;
CLAWS_DAMAGE_MOD     = 3&lt;br /&gt;
CLAWS_NAME         = &amp;quot;claws&amp;quot;&lt;br /&gt;
CLAWS_HIT         = &amp;quot;slashes&amp;quot;&lt;br /&gt;
CLAWS_MISS         = &amp;quot;swipes at but misses&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SWORD_DAMAGE_MOD     = 5&lt;br /&gt;
SWORD_NAME         = &amp;quot;sword&amp;quot;&lt;br /&gt;
SWORD_HIT         = &amp;quot;stabs&amp;quot;&lt;br /&gt;
SWORD_MISS         = &amp;quot;swings at but misses&amp;quot;&lt;br /&gt;
&lt;br /&gt;
WAND_DAMAGE_MOD    = 30&lt;br /&gt;
WAND_NAME        = &amp;quot;magic wand&amp;quot;&lt;br /&gt;
WAND_HIT        = &amp;quot;blasts a fireball at&amp;quot;&lt;br /&gt;
WAND_MISS        = &amp;quot;aims at but misses&amp;quot;&lt;br /&gt;
&lt;br /&gt;
INTRO = &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Welcome to the game.  You control the actions of the valient Gnusto Frotz, a &lt;br /&gt;
warrior who has stumbled into a spooky haunted house.  &lt;br /&gt;
&lt;br /&gt;
You can use commands such as &amp;#039;north&amp;#039; or simply &amp;#039;n&amp;#039; to move.&lt;br /&gt;
&lt;br /&gt;
You can use &amp;#039;attack&amp;#039; to attack a monster with a single blow.  &lt;br /&gt;
&lt;br /&gt;
You can also use &amp;#039;look&amp;#039; to examine the room you are in, and &amp;#039;get &amp;lt;thing&amp;gt; to pick up an item named &amp;lt;thing&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Finally, you can type &amp;lt;quit&amp;gt; when you are done playing.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
currentRoom = Room()&lt;br /&gt;
&lt;br /&gt;
# create the weapons, creatures, and rooms&lt;br /&gt;
claws = Weapon(CLAWS_NAME, CLAWS_DAMAGE_MOD, CLAWS_HIT, CLAWS_MISS)&lt;br /&gt;
sword = Weapon(SWORD_NAME, SWORD_DAMAGE_MOD, SWORD_HIT, SWORD_MISS)&lt;br /&gt;
wand = Weapon(WAND_NAME, WAND_DAMAGE_MOD, WAND_HIT, WAND_MISS)&lt;br /&gt;
&lt;br /&gt;
player = Creature(WARRIOR_NAME, WARRIOR_TYPE, WARRIOR_PRONOUN, WARRIOR_HP, WARRIOR_STR, WARRIOR_SKILL, WARRIOR_AC)&lt;br /&gt;
monster = Creature(MONSTER_NAME, MONSTER_TYPE, MONSTER_PRONOUN, MONSTER_HP, MONSTER_STR, MONSTER_SKILL, MONSTER_AC)&lt;br /&gt;
monster.weapon = claws&lt;br /&gt;
&lt;br /&gt;
grue = Creature(GRUE_NAME, GRUE_TYPE, GRUE_PRONOUN, GRUE_HP, GRUE_STR, GRUE_SKILL, GRUE_AC)&lt;br /&gt;
&lt;br /&gt;
kitchen = Room(&amp;quot;This is the spooky kitchen of the haunted house&amp;quot;, None, None)&lt;br /&gt;
diningRoom = Room(&amp;quot;This is the tattered dining hall of the haunted mansion&amp;quot;, monster, sword)&lt;br /&gt;
parlor = Room(&amp;quot;This is the decrepit parlor. The once-rich tapesties and mouldering furniture fill you with a sense of foreboding.&amp;quot;)&lt;br /&gt;
pit = Room(&amp;quot;Oh no!  You&amp;#039;ve fallen in a pit.  There is no way out.  You might as well quit.\n&amp;quot;)&lt;br /&gt;
hallway = Room(&amp;quot;This is a long creepy hallway from the parlor to the bedrooms.&amp;quot;)&lt;br /&gt;
bedroom = Room(&amp;quot;This is the haunted bedroom.  A stench of evil pervades the air.&amp;quot;, grue, wand)&lt;br /&gt;
        &lt;br /&gt;
# connect the rooms together&lt;br /&gt;
kitchen.roomToEast = diningRoom&lt;br /&gt;
diningRoom.roomToWest = kitchen&lt;br /&gt;
diningRoom.roomToNorth = parlor&lt;br /&gt;
parlor.roomToSouth = diningRoom&lt;br /&gt;
parlor.roomToNorth = pit&lt;br /&gt;
parlor.roomToEast = hallway&lt;br /&gt;
hallway.roomToWest = parlor&lt;br /&gt;
hallway.roomToEast = bedroom&lt;br /&gt;
bedroom.roomToWest = hallway&lt;br /&gt;
        &lt;br /&gt;
# place the player and print introduction&lt;br /&gt;
currentRoom = kitchen&lt;br /&gt;
print(INTRO)&lt;br /&gt;
        &lt;br /&gt;
# main loop&lt;br /&gt;
while True:&lt;br /&gt;
    newRoom = currentRoom.enterRoom(player)&lt;br /&gt;
    if (newRoom == None):&lt;br /&gt;
        print(&amp;quot;Thank you for playing!  Goodbye.&amp;quot;)&lt;br /&gt;
        break&lt;br /&gt;
    else:&lt;br /&gt;
        currentRoom = newRoom&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>