<?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=Python_-_Room_class_assignment</id>
	<title>Python - Room class assignment - 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=Python_-_Room_class_assignment"/>
	<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;action=history"/>
	<updated>2026-06-10T05:26:40Z</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=Python_-_Room_class_assignment&amp;diff=10249&amp;oldid=prev</id>
		<title>Admin at 18:33, 9 May 2013</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10249&amp;oldid=prev"/>
		<updated>2013-05-09T18:33:04Z</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 18:33, 9 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-l48&quot; &gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&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;#039;&amp;#039;&amp;#039;void printDescription(self)&amp;#039;&amp;#039;&amp;#039;: Print blank lines at the beginning and end of the method.&amp;#160; This method prints the room&amp;#039;s description, then prints a line describing the exits of the room.&amp;#160; This line should take the form, &amp;quot;You may exit to the north&amp;quot; or &amp;quot;You may exit to the east, south, and west&amp;quot;.&amp;#160; If a room has no exits the line should read, &amp;quot;There are no exits&amp;quot;.&amp;#160; If there is a weapon or a creature in the room, it should print these out as well.&amp;#160; Note that you are welcome to print the exits on separate lines (one line says, &amp;quot;There is an exit to the north&amp;quot;, the next line says, &amp;quot;there is an exit to the south&amp;quot;, etc.)&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;#039;&amp;#039;&amp;#039;void printDescription(self)&amp;#039;&amp;#039;&amp;#039;: Print blank lines at the beginning and end of the method.&amp;#160; This method prints the room&amp;#039;s description, then prints a line describing the exits of the room.&amp;#160; This line should take the form, &amp;quot;You may exit to the north&amp;quot; or &amp;quot;You may exit to the east, south, and west&amp;quot;.&amp;#160; If a room has no exits the line should read, &amp;quot;There are no exits&amp;quot;.&amp;#160; If there is a weapon or a creature in the room, it should print these out as well.&amp;#160; Note that you are welcome to print the exits on separate lines (one line says, &amp;quot;There is an exit to the north&amp;quot;, the next line says, &amp;quot;there is an exit to the south&amp;quot;, etc.)&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 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Room enterRoom(self, Creature player)&amp;#039;&amp;#039;&amp;#039;: This method is called when the player enters a room, and handles all user input and actions until the player leaves that room (at which point enterRoom() returns a reference to the Room object that the player enters next) or quits (at which point enterRoom() returns &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;null&lt;/del&gt;). The method should:&lt;/div&gt;&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;* &amp;#039;&amp;#039;&amp;#039;Room enterRoom(self, Creature player)&amp;#039;&amp;#039;&amp;#039;: This method is called when the player enters a room, and handles all user input and actions until the player leaves that room (at which point enterRoom() returns a reference to the Room object that the player enters next) or quits (at which point enterRoom() returns &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;None&lt;/ins&gt;). The method should:&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;# Call printDescription() to describe the room to the user&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;# Call printDescription() to describe the room to the user&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;# Then enter a while loop that repeatedly:&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;# Then enter a while loop that repeatedly:&lt;/div&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-l57&quot; &gt;Line 57:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 57:&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;#039;&amp;#039;&amp;#039;menu.LOOK&amp;#039;&amp;#039;&amp;#039;: calls printDescription() to describe the room again.&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;#039;&amp;#039;&amp;#039;menu.LOOK&amp;#039;&amp;#039;&amp;#039;: calls printDescription() to describe the room again.&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;#039;&amp;#039;&amp;#039;menu.GET&amp;#039;&amp;#039;&amp;#039;: Check to see if the item field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to get&amp;quot;.&amp;#160; Otherwise:&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;#039;&amp;#039;&amp;#039;menu.GET&amp;#039;&amp;#039;&amp;#039;: Check to see if the item field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to get&amp;quot;.&amp;#160; Otherwise:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;##** If the player does not already have a weapon (i.e., player.weapon.name is &amp;quot;bare hands&amp;quot;), then set the player.weapon field to the weapon in this room, and set the weapon in this room to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;null&lt;/del&gt;.&amp;#160; Print a message like &amp;quot;You pick up the &amp;lt;weapon name&amp;gt;&amp;quot;.&amp;#160; Note that when a monster is initially created, it has a default weapon (&amp;quot;bare hands&amp;quot;) created.&lt;/div&gt;&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;##** If the player does not already have a weapon (i.e., player.weapon.name is &amp;quot;bare hands&amp;quot;), then set the player.weapon field to the weapon in this room, and set the weapon in this room to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;None&lt;/ins&gt;.&amp;#160; Print a message like &amp;quot;You pick up the &amp;lt;weapon name&amp;gt;&amp;quot;.&amp;#160; Note that when a monster is initially created, it has a default weapon (&amp;quot;bare hands&amp;quot;) created.&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;##** If the player is already holding a weapon (other than the default &amp;quot;bare hands&amp;quot; weapon) then the player should &amp;quot;drop&amp;quot; it first (i.e.,&amp;#160; swap the reference stored in player.weapon with that stored in self.item and print out an appropriate message).&amp;#160; In other words, the self.item field should be set to the contents of player.weapon, and vice-versa.&amp;#160; You will need to use a temporary Weapon variable to perform this swap.&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;##** If the player is already holding a weapon (other than the default &amp;quot;bare hands&amp;quot; weapon) then the player should &amp;quot;drop&amp;quot; it first (i.e.,&amp;#160; swap the reference stored in player.weapon with that stored in self.item and print out an appropriate message).&amp;#160; In other words, the self.item field should be set to the contents of player.weapon, and vice-versa.&amp;#160; You will need to use a temporary Weapon variable to perform this swap.&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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=Python_-_Room_class_assignment&amp;diff=10248&amp;oldid=prev</id>
		<title>Admin: /* Attributes */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10248&amp;oldid=prev"/>
		<updated>2013-05-09T18:20:36Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Attributes&lt;/span&gt;&lt;/span&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 18:20, 9 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-l12&quot; &gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&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;** Default: -1&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;** Default: -1&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 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;int col&amp;#039;&amp;#039;&amp;#039;: will contain the column location of the room &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(default to -1)&lt;/del&gt;&lt;/div&gt;&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;* &amp;#039;&amp;#039;&amp;#039;int col&amp;#039;&amp;#039;&amp;#039;: will contain the column location of the room&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;** Default: -1&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;** Default: -1&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;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10247&amp;oldid=prev</id>
		<title>Admin at 18:20, 9 May 2013</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10247&amp;oldid=prev"/>
		<updated>2013-05-09T18:20:23Z</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 18:20, 9 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-l58&quot; &gt;Line 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&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;#039;&amp;#039;&amp;#039;menu.GET&amp;#039;&amp;#039;&amp;#039;: Check to see if the item field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to get&amp;quot;.&amp;#160; Otherwise:&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;#039;&amp;#039;&amp;#039;menu.GET&amp;#039;&amp;#039;&amp;#039;: Check to see if the item field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to get&amp;quot;.&amp;#160; Otherwise:&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;##** If the player does not already have a weapon (i.e., player.weapon.name is &amp;quot;bare hands&amp;quot;), then set the player.weapon field to the weapon in this room, and set the weapon in this room to null.&amp;#160; Print a message like &amp;quot;You pick up the &amp;lt;weapon name&amp;gt;&amp;quot;.&amp;#160; Note that when a monster is initially created, it has a default weapon (&amp;quot;bare hands&amp;quot;) created.&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;##** If the player does not already have a weapon (i.e., player.weapon.name is &amp;quot;bare hands&amp;quot;), then set the player.weapon field to the weapon in this room, and set the weapon in this room to null.&amp;#160; Print a message like &amp;quot;You pick up the &amp;lt;weapon name&amp;gt;&amp;quot;.&amp;#160; Note that when a monster is initially created, it has a default weapon (&amp;quot;bare hands&amp;quot;) created.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;##** If the player is already holding a weapon (other than the default &amp;quot;bare hands&amp;quot; weapon) then the player should &amp;quot;drop&amp;quot; it first (i.e.,&amp;#160; swap the reference stored in player.weapon with that stored in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;weapon &lt;/del&gt;and print out an appropriate message).&amp;#160; In other words, the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;weapon &lt;/del&gt;field should be set to the contents of player.weapon, and vice-versa.&amp;#160; You will need to use a temporary Weapon variable to perform this swap.&lt;/div&gt;&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;##** If the player is already holding a weapon (other than the default &amp;quot;bare hands&amp;quot; weapon) then the player should &amp;quot;drop&amp;quot; it first (i.e.,&amp;#160; swap the reference stored in player.weapon with that stored in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;self&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;item &lt;/ins&gt;and print out an appropriate message).&amp;#160; In other words, the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;self&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;item &lt;/ins&gt;field should be set to the contents of player.weapon, and vice-versa.&amp;#160; You will need to use a temporary Weapon variable to perform this swap.&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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=Python_-_Room_class_assignment&amp;diff=10234&amp;oldid=prev</id>
		<title>Admin: /* Methods */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10234&amp;oldid=prev"/>
		<updated>2013-05-09T17:29:48Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Methods&lt;/span&gt;&lt;/span&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:29, 9 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-l61&quot; &gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Checks &lt;/del&gt;whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&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 class=&quot;diffchange diffchange-inline&quot;&gt;Check &lt;/ins&gt;whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&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 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;== Testing ==&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;== Testing ==&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=Python_-_Room_class_assignment&amp;diff=10233&amp;oldid=prev</id>
		<title>Admin: /* Methods */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10233&amp;oldid=prev"/>
		<updated>2013-05-09T17:29:38Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Methods&lt;/span&gt;&lt;/span&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:29, 9 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-l61&quot; &gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;##&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* &lt;/del&gt;Checks whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&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;## Checks whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&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 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;== Testing ==&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;== Testing ==&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=Python_-_Room_class_assignment&amp;diff=10232&amp;oldid=prev</id>
		<title>Admin: /* Methods */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10232&amp;oldid=prev"/>
		<updated>2013-05-09T17:29:13Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Methods&lt;/span&gt;&lt;/span&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:29, 9 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-l61&quot; &gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## Checks whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&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 class=&quot;diffchange diffchange-inline&quot;&gt;* &lt;/ins&gt;Checks whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&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 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;== Testing ==&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;== Testing ==&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=Python_-_Room_class_assignment&amp;diff=10231&amp;oldid=prev</id>
		<title>Admin: /* Methods */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10231&amp;oldid=prev"/>
		<updated>2013-05-09T17:28:27Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Methods&lt;/span&gt;&lt;/span&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:28, 9 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-l59&quot; &gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&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;##** If the player does not already have a weapon (i.e., player.weapon.name is &amp;quot;bare hands&amp;quot;), then set the player.weapon field to the weapon in this room, and set the weapon in this room to null.&amp;#160; Print a message like &amp;quot;You pick up the &amp;lt;weapon name&amp;gt;&amp;quot;.&amp;#160; Note that when a monster is initially created, it has a default weapon (&amp;quot;bare hands&amp;quot;) created.&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;##** If the player does not already have a weapon (i.e., player.weapon.name is &amp;quot;bare hands&amp;quot;), then set the player.weapon field to the weapon in this room, and set the weapon in this room to null.&amp;#160; Print a message like &amp;quot;You pick up the &amp;lt;weapon name&amp;gt;&amp;quot;.&amp;#160; Note that when a monster is initially created, it has a default weapon (&amp;quot;bare hands&amp;quot;) created.&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;##** If the player is already holding a weapon (other than the default &amp;quot;bare hands&amp;quot; weapon) then the player should &amp;quot;drop&amp;quot; it first (i.e.,&amp;#160; swap the reference stored in player.weapon with that stored in this.weapon and print out an appropriate message).&amp;#160; In other words, the this.weapon field should be set to the contents of player.weapon, and vice-versa.&amp;#160; You will need to use a temporary Weapon variable to perform this swap.&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;##** If the player is already holding a weapon (other than the default &amp;quot;bare hands&amp;quot; weapon) then the player should &amp;quot;drop&amp;quot; it first (i.e.,&amp;#160; swap the reference stored in player.weapon with that stored in this.weapon and print out an appropriate message).&amp;#160; In other words, the this.weapon field should be set to the contents of player.weapon, and vice-versa.&amp;#160; You will need to use a temporary Weapon variable to perform this swap.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;##* &amp;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&lt;/div&gt;&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;##* &amp;#039;&amp;#039;&amp;#039;menu.ATTACK&amp;#039;&amp;#039;&amp;#039;: Check to see if the monster field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&amp;#160; If so, print &amp;quot;There is nothing to attack&amp;quot;. Otherwise, have the player try to attack the monster using the various methods in the Creature class (e.g., tryToAttack(), takeDamage(), constructHitString(), etc.) -- see the [[CombatSimulation.py]] for an example of how to do this. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Be sure to print out the amount of hit points for both the player and the monster.&amp;#160; &lt;/ins&gt;Whether or not the attack succeeds in causing damage, set the monster&amp;#039;s &amp;#039;&amp;#039;&amp;#039;angry&amp;#039;&amp;#039;&amp;#039; field to True to indicate that the monster will now attack the player.&amp;#160; If the monster is no longer alive after the attack, print a message to indicate that the player is victorious and set the monster field to &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. &amp;#160;&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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;#039;&amp;#039;&amp;#039;menu.QUIT&amp;#039;&amp;#039;&amp;#039;: return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; from the enterRoom() method.&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;## Checks whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&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;## Checks whether the monster is angry (i.e., monster.angry == True) and if so, has the monster attack the player.&amp;#160; If the player is no longer alive after the attack, print a message such as &amp;quot;You died.&amp;quot; and return &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;.&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=Python_-_Room_class_assignment&amp;diff=10214&amp;oldid=prev</id>
		<title>Admin: /* Methods */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10214&amp;oldid=prev"/>
		<updated>2013-05-06T17:18:21Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Methods&lt;/span&gt;&lt;/span&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:18, 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-l46&quot; &gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&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;#039;&amp;#039;&amp;#039;void setRowCol(self, int r, int c)&amp;#039;&amp;#039;&amp;#039;: a mutator to set the row and col attributes at the same time&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;#039;&amp;#039;&amp;#039;void setRowCol(self, int r, int c)&amp;#039;&amp;#039;&amp;#039;: a mutator to set the row and col attributes at the same time&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 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;void printDescription(self)&amp;#039;&amp;#039;&amp;#039;: This method prints the room&amp;#039;s description, then prints a line describing the exits of the room.&amp;#160; This line should take the form, &amp;quot;You may exit to the north&amp;quot; or &amp;quot;You may exit to the east, south, and west&amp;quot;.&amp;#160; If a room has no exits the line should read, &amp;quot;There are no exits&amp;quot;.&amp;#160; If there is a weapon or a creature in the room, it should print these out as well.&amp;#160; Note that you are welcome to print the exits on separate lines (one line says, &amp;quot;There is an exit to the north&amp;quot;, the next line says, &amp;quot;there is an exit to the south&amp;quot;, etc.)&lt;/div&gt;&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;* &amp;#039;&amp;#039;&amp;#039;void printDescription(self)&amp;#039;&amp;#039;&amp;#039;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Print blank lines at the beginning and end of the method.&amp;#160; &lt;/ins&gt;This method prints the room&amp;#039;s description, then prints a line describing the exits of the room.&amp;#160; This line should take the form, &amp;quot;You may exit to the north&amp;quot; or &amp;quot;You may exit to the east, south, and west&amp;quot;.&amp;#160; If a room has no exits the line should read, &amp;quot;There are no exits&amp;quot;.&amp;#160; If there is a weapon or a creature in the room, it should print these out as well.&amp;#160; Note that you are welcome to print the exits on separate lines (one line says, &amp;quot;There is an exit to the north&amp;quot;, the next line says, &amp;quot;there is an exit to the south&amp;quot;, etc.)&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 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;#039;&amp;#039;&amp;#039;Room enterRoom(self, Creature player)&amp;#039;&amp;#039;&amp;#039;: This method is called when the player enters a room, and handles all user input and actions until the player leaves that room (at which point enterRoom() returns a reference to the Room object that the player enters next) or quits (at which point enterRoom() returns null). The method should:&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;#039;&amp;#039;&amp;#039;Room enterRoom(self, Creature player)&amp;#039;&amp;#039;&amp;#039;: This method is called when the player enters a room, and handles all user input and actions until the player leaves that room (at which point enterRoom() returns a reference to the Room object that the player enters next) or quits (at which point enterRoom() returns null). The method should:&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=Python_-_Room_class_assignment&amp;diff=10213&amp;oldid=prev</id>
		<title>Admin: /* Testing */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10213&amp;oldid=prev"/>
		<updated>2013-05-06T16:57:15Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Testing&lt;/span&gt;&lt;/span&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 16:57, 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-l66&quot; &gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&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;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Notice that unlike the CombatSimulation class of the prior assignment, the combat is not carried through to completion when the user types &amp;quot;attack&amp;quot;.&amp;#160; Instead the combat happens one round at a time, requiring the player to type &amp;quot;attack&amp;quot; every turn if they want to keep attacking, but also allowing the player to leave the room if combat is going badly.&amp;#160; Once a monster is angry, however, it will continue attacking the player as long as the player is in the same room as the monster.&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;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Notice that unlike the CombatSimulation class of the prior assignment, the combat is not carried through to completion when the user types &amp;quot;attack&amp;quot;.&amp;#160; Instead the combat happens one round at a time, requiring the player to type &amp;quot;attack&amp;quot; every turn if they want to keep attacking, but also allowing the player to leave the room if combat is going badly.&amp;#160; Once a monster is angry, however, it will continue attacking the player as long as the player is in the same room as the monster.&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 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can test your Room, Creature, Weapon, and menu files via the [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;RoomGame&lt;/del&gt;.py]] file. This test game sets up several Room, Creature, and Weapon objects (including the Creature object that represents the player), prints out an introduction, and enters a loop that repeatedly calls the enterRoom() method of the Room object in which the player is located.&lt;/div&gt;&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;You can test your Room, Creature, Weapon, and menu files via the [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;RoomTest&lt;/ins&gt;.py]] file. This test game sets up several Room, Creature, and Weapon objects (including the Creature object that represents the player), prints out an introduction, and enters a loop that repeatedly calls the enterRoom() method of the Room object in which the player is located.&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=Python_-_Room_class_assignment&amp;diff=10212&amp;oldid=prev</id>
		<title>Admin: /* Methods */</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=Python_-_Room_class_assignment&amp;diff=10212&amp;oldid=prev"/>
		<updated>2013-05-06T16:01:51Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Methods&lt;/span&gt;&lt;/span&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 16:01, 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-l52&quot; &gt;Line 52:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&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;# Then enter a while loop that repeatedly:&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;# Then enter a while loop that repeatedly:&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;## Calls &amp;#039;&amp;#039;&amp;#039;menu.parse()&amp;#039;&amp;#039;&amp;#039; to process the next line from the keyboard.&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;## Calls &amp;#039;&amp;#039;&amp;#039;menu.parse()&amp;#039;&amp;#039;&amp;#039; to process the next line from the keyboard.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## Uses an &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039; statement on the result of parse() to run the appropriate code for the action that the user typed.&amp;#160; Note that these values are all defined in the menu module, so you need to call them menu.NORTH instead of NORTH.&lt;/div&gt;&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;## Uses an &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039; statement on the result of parse() to run the appropriate code for the action that the user typed.&amp;#160; Note that these values are all defined in the menu module, so you need to call them menu.NORTH instead of NORTH. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(Example: &amp;#039;&amp;#039;&amp;#039;if result==menu.NORTH&amp;#039;&amp;#039;&amp;#039;)&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;##* &amp;#039;&amp;#039;&amp;#039;menu.NORTH&amp;#039;&amp;#039;&amp;#039;: Check to see if the roomToNorth field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. If so, print &amp;quot;There is no exit to the north&amp;quot;. Otherwise, print &amp;quot;You walk to the north&amp;quot; and return roomToNorth as the return value from this method.&amp;#160; Note that you are not returning a new Room object -- you are returning the value of the roomToNorth.&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;#039;&amp;#039;&amp;#039;menu.NORTH&amp;#039;&amp;#039;&amp;#039;: Check to see if the roomToNorth field is &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039;. If so, print &amp;quot;There is no exit to the north&amp;quot;. Otherwise, print &amp;quot;You walk to the north&amp;quot; and return roomToNorth as the return value from this method.&amp;#160; Note that you are not returning a new Room object -- you are returning the value of the roomToNorth.&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;##* Similarly for &amp;#039;&amp;#039;&amp;#039;menu.EAST&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;menu.SOUTH&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;menu.WEST&amp;#039;&amp;#039;&amp;#039;.&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;##* Similarly for &amp;#039;&amp;#039;&amp;#039;menu.EAST&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;menu.SOUTH&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;menu.WEST&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>