A SelectionObject for selecting sides of hexes. Some objects reside on the sides of two hexes, like roads and ships. During the game, there are opportunities for players to place a new one of these on the board. The class SideSelectionObject provides a way for the View to represent the available sides for selection in the game. It stores a boost::tuple (see http://www.boost.org /libs /tuple /doc /tuple_users_guide.html) of a side ID, Vector coordinates of the side, and a float rotation that should be applied to the selection to make it line up along the side of a hex. The class DrawSideSelectionObject (located in CoreRules) is responsible for actually drawing the locations on the screen, but the SideSelectionObject provides all of the data for drawing, just like any other IGameObject/IDrawObject pairing.
An IRule may create a SideSelectionObject and then add new side tuples to it via the add function. The side tuples can be read out of the SideSelectionObject via the iterator-providing selection_begin and selection_end functions.
SideSelectionObject.h
A SelectionObject for selecting sides of hexes. | |
The SideSelectionObject constructor. | |
Adds another side ID/Vector/rotation tuple to the std::list. | |
Returns an iterator to the start of the side ID/Vector/rotation std::list. | |
Returns an iterator to the end of the side ID/Vector/rotation std::list. | |
Clones the SideSelectionObject. | |
Resets the class name of the SideSelectionObject. | |
The std::list of corner ID/Vector/rotation tuples that are selectable sides. |
The SideSelectionObject constructor. | |
Adds another side ID/Vector/rotation tuple to the std::list. | |
Returns an iterator to the start of the side ID/Vector/rotation std::list. | |
Returns an iterator to the end of the side ID/Vector/rotation std::list. | |
Clones the SideSelectionObject. | |
Resets the class name of the SideSelectionObject. |
|
The SideSelectionObject constructor. Stores the given rule name and selection color. See SelectionObject for details.
|
Adds another side ID/Vector/rotation tuple to the std::list.
The std::list of corner ID/Vector/rotation tuples that are selectable sides. |
| SideSelectionList mSelectionList |
The std::list of corner ID/Vector/rotation tuples that are selectable sides.
|
|
| SideSelectionList::const_iterator selection_begin() |
| SideSelectionList::const_iterator selection_end() |
| virtual IGameObject *Clone() |
| virtual wxString name() |
| SideSelectionList mSelectionList |