A SelectionObject for selecting corners of hexes. Some objects reside on the corners of three hexes, like settlements, cities, knights, etc. During the game, there are opportunities for players to place a new one of these objects on the board. The class CornerSelectionObject provides a way for the View to represent the available corners for selection in the game. It stores a list of std::pair<> objects of a corner ID and the Vector coordinates of the corner. The class DrawCornerSelectionObject (located in CoreRules) is responsible for actually drawing the locations on the screen, but CornerSelectionObject provides all of the data for drawing, just like any other IGameObject/IDrawObject pairing.
An IRule may create a CornerSelectionObject and then add new corner pairs to it via the add function. The corner pairs can be read out of the CornerSelectionObject via the iterator-providing selection_begin and selection_end functions.
CornerSelectionObject.h
A SelectionObject for selecting corners of hexes. | |
The CornerSelectionObject constructor. | |
Adds another corner ID/Vector pair to the std::list. | |
Returns an iterator to the start of the corner ID/Vector std::list. | |
Returns an iterator to the end of the corner ID/Vector std::list. | |
Clones the CornerSelectionObject. | |
Resets the class name of the CornerSelectionObject. | |
The std::list of corner ID/Vector pairs that are selectable corners. |
The CornerSelectionObject constructor. | |
Adds another corner ID/Vector pair to the std::list. | |
Returns an iterator to the start of the corner ID/Vector std::list. | |
Returns an iterator to the end of the corner ID/Vector std::list. | |
Clones the CornerSelectionObject. | |
Resets the class name of the CornerSelectionObject. |
|
The CornerSelectionObject constructor. Stores the given rule name and selection color. See SelectionObject for details.
|
Adds another corner ID/Vector pair to the std::list.
The std::list of corner ID/Vector pairs that are selectable corners. |
| CornerSelectionList mSelectionList |
The std::list of corner ID/Vector pairs that are selectable corners.
|
|
| CornerSelectionList::const_iterator selection_begin() |
| CornerSelectionList::const_iterator selection_end() |
| virtual IGameObject *Clone() |
| virtual wxString name() |
| CornerSelectionList mSelectionList |