[Verba] (no subject)
Stuart D. Gathman
stuart at gathman.org
Sun Jan 22 00:40:35 EST 2006
On Sat, 21 Jan 2006, Taylor Solomon wrote:
> I was thinking for the wumpus game...What is the structure of the rooms?
>
> Does somehow the rooms just never end because the tunnels in the
> rooms connect to random other rooms?
The rooms never end in the same sense that travelling east never ends.
In the game as described, there are exactly 20 rooms, each connecting to
3 other rooms. Supposed there were 4 rooms, each connecting to three
other rooms. That would be a tetrahedron. Each room is one of the
four vertices. Each vertice connects to the 3 other rooms.
The 20 rooms, each connecting to 3 other rooms, form the 20 vertices of a
dodecahedron. Extra credit: How many faces? How many sides to a face?
How many edges?
> Say you have room one. rooms 2,3,and 4 connect to it. if you go
> through 2, you can go to 5,6 and 7, and so on. until you reach the
> end. What do we do at the end? We would have to create each room to
> connect to one of the ones before it.
>
> This is very confusing
>
> Please help, anybody with a brain.
Lets look at it with 4 rooms numbered 1,2,3,4:
Room Connects to
1 2 3 4
2 1 3 4
3 1 2 4
4 1 2 3
You can wander from room to room forever, but the there are still only 4 rooms.
Does that make you think of a Python list? E.g. (changing to 0 origin):
connections = [(1,2,3),(0,2,3),(0,1,3),(0,1,2)]
--
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
More information about the Verba
mailing list