Description

A block is a minimum available unit of the map data. A block can have rooms, items, and players in it. Each block has an identical id to distinguish it from others. A block doesn't belong to any other >mazeObject in the map.

Modification modified classes

Functions for building map are added.

Structure

A block has an identical id to distinguish from others and uses (row, col) pair to indicate the position of the block in the map.

A block has three hash tables : roomTable, itemTable, and playerTable. These hash tables are each for storing rooms, items, and players in this block.

The class Block has methods: addRoom, addItem, removeItem, addPlayer, removePlayer, ServerUpdateMOve to construct and update the block.

The method producingMessage() is to produce a MsgBlock message of this block and the method export(PrintStream) is to export all the mazeObjects in this block.



See modified classes

Block
Room
Door




[Go to Class Index Table]