Games::Wumpus::Room - Cave room used for Hunt the Wumpus
my $room = Games::Wumpus::Room -> new -> init; $room -> set_hazard ($WUMPUS); @exits = $room -> exits;
Games::Wumpus::Room is used to create objects representing rooms in the Hunt the Wumpus cave system. It's used from
The following methods are implemented:
Class method returning an unintialized object.
Initializes the room.
Accessor returning the name of the room.
Accessor setting the name of the room.
Accessor setting one or more hazards in the room. Multiple hazards should be
orred. Note that existing hazards aren't cleared.
Accessor returning a bitfield with the hazards of the room.
Accessor removing all hazards from the room.
Accessor clearing the given hazard from the room.
Accessor returning true if the room contains the given hazard.
Accessor returning all the exits (rooms with tunnels leading to them) of the room.
Accessor adding the given exit to the room.
Accessor returning the exit which was passed by name. Returns undefined if the exit doesn't exist.
Returns true if one of the exits leads to the given hazard.
Configuration of the game should be possible.
The current sources of this module are found on github, git://github.com/Abigail/Games--Wumpus.git.
Copyright (C) 2009 by Abigail.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To install this module, run, after unpacking the tar-ball, the following commands:
perl Makefile.PL make make test make install