14 public: |
14 public: |
15 static const char *GetClassName() { return "AIMarine"; } |
15 static const char *GetClassName() { return "AIMarine"; } |
16 |
16 |
17 /** |
17 /** |
18 * Checks whether the given tile is actually a tile with a water depot. |
18 * Checks whether the given tile is actually a tile with a water depot. |
19 * @param tile the tile to check. |
19 * @param tile The tile to check. |
20 * @pre AIMap::IsValidTile(tile). |
20 * @pre AIMap::IsValidTile(tile). |
21 * @return true if and only if the tile has a water depot. |
21 * @return True if and only if the tile has a water depot. |
22 */ |
22 */ |
23 static bool IsWaterDepotTile(TileIndex tile); |
23 static bool IsWaterDepotTile(TileIndex tile); |
24 |
24 |
25 /** |
25 /** |
26 * Checks whether the given tile is actually a tile with a dock. |
26 * Checks whether the given tile is actually a tile with a dock. |
27 * @param tile the tile to check. |
27 * @param tile The tile to check. |
28 * @pre AIMap::IsValidTile(tile). |
28 * @pre AIMap::IsValidTile(tile). |
29 * @return true if and only if the tile has a dock. |
29 * @return True if and only if the tile has a dock. |
30 */ |
30 */ |
31 static bool IsDockTile(TileIndex tile); |
31 static bool IsDockTile(TileIndex tile); |
32 |
32 |
33 /** |
33 /** |
34 * Checks whether the given tile is actually a tile with a buoy. |
34 * Checks whether the given tile is actually a tile with a buoy. |
35 * @param tile the tile to check. |
35 * @param tile The tile to check. |
36 * @pre AIMap::IsValidTile(tile). |
36 * @pre AIMap::IsValidTile(tile). |
37 * @return true if and only if the tile has a buoy. |
37 * @return True if and only if the tile has a buoy. |
38 */ |
38 */ |
39 static bool IsBuoyTile(TileIndex tile); |
39 static bool IsBuoyTile(TileIndex tile); |
40 |
40 |
41 /** |
41 /** |
42 * Checks whether the given tile is actually a tile with a lock. |
42 * Checks whether the given tile is actually a tile with a lock. |
43 * @param tile the tile to check. |
43 * @param tile The tile to check. |
44 * @pre AIMap::IsValidTile(tile). |
44 * @pre AIMap::IsValidTile(tile). |
45 * @return true if and only if the tile has a lock. |
45 * @return True if and only if the tile has a lock. |
46 */ |
46 */ |
47 static bool IsLockTile(TileIndex tile); |
47 static bool IsLockTile(TileIndex tile); |
48 |
48 |
49 /** |
49 /** |
50 * Checks whether the given tile is actually a tile with a canal. |
50 * Checks whether the given tile is actually a tile with a canal. |
51 * @param tile the tile to check. |
51 * @param tile The tile to check. |
52 * @pre AIMap::IsValidTile(tile). |
52 * @pre AIMap::IsValidTile(tile). |
53 * @return true if and only if the tile has a canal. |
53 * @return True if and only if the tile has a canal. |
54 */ |
54 */ |
55 static bool IsCanalTile(TileIndex tile); |
55 static bool IsCanalTile(TileIndex tile); |
56 |
56 |
57 /** |
57 /** |
58 * Builds a water depot on tile. |
58 * Builds a water depot on tile. |
59 * @param tile the tile where the water depot will be build. |
59 * @param tile The tile where the water depot will be build. |
60 * @param vertical if true, depot will be vertical, else horizontal. |
60 * @param vertical If true, depot will be vertical, else horizontal. |
61 * @pre AIMap::IsValidTile(tile). |
61 * @pre AIMap::IsValidTile(tile). |
62 * @return whether the water depot has been/can be build or not. |
62 * @return Whether the water depot has been/can be build or not. |
63 */ |
63 */ |
64 static bool BuildWaterDepot(TileIndex tile, bool vertical); |
64 static bool BuildWaterDepot(TileIndex tile, bool vertical); |
65 |
65 |
66 /** |
66 /** |
67 * Builds a dock where tile is the tile still on land. |
67 * Builds a dock where tile is the tile still on land. |
68 * @param tile the tile still on land of the dock. |
68 * @param tile The tile still on land of the dock. |
69 * @pre AIMap::IsValidTile(tile). |
69 * @pre AIMap::IsValidTile(tile). |
70 * @return whether the dock has been/can be build or not. |
70 * @return Whether the dock has been/can be build or not. |
71 */ |
71 */ |
72 static bool BuildDock(TileIndex tile); |
72 static bool BuildDock(TileIndex tile); |
73 |
73 |
74 /** |
74 /** |
75 * Builds a buoy on tile. |
75 * Builds a buoy on tile. |
76 * @param tile the tile where the buoy will be build. |
76 * @param tile The tile where the buoy will be build. |
77 * @pre AIMap::IsValidTile(tile). |
77 * @pre AIMap::IsValidTile(tile). |
78 * @return whether the buoy has been/can be build or not. |
78 * @return Whether the buoy has been/can be build or not. |
79 */ |
79 */ |
80 static bool BuildBuoy(TileIndex tile); |
80 static bool BuildBuoy(TileIndex tile); |
81 |
81 |
82 /** |
82 /** |
83 * Builds a lock on tile. |
83 * Builds a lock on tile. |
84 * @param tile the tile where the lock will be build. |
84 * @param tile The tile where the lock will be build. |
85 * @pre AIMap::IsValidTile(tile). |
85 * @pre AIMap::IsValidTile(tile). |
86 * @return whether the lock has been/can be build or not. |
86 * @return Whether the lock has been/can be build or not. |
87 */ |
87 */ |
88 static bool BuildLock(TileIndex tile); |
88 static bool BuildLock(TileIndex tile); |
89 |
89 |
90 /** |
90 /** |
91 * Builds a canal on tile. |
91 * Builds a canal on tile. |
92 * @param tile the tile where the canal will be build. |
92 * @param tile The tile where the canal will be build. |
93 * @pre AIMap::IsValidTile(tile). |
93 * @pre AIMap::IsValidTile(tile). |
94 * @return whether the canal has been/can be build or not. |
94 * @return Whether the canal has been/can be build or not. |
95 */ |
95 */ |
96 static bool BuildCanal(TileIndex tile); |
96 static bool BuildCanal(TileIndex tile); |
97 |
97 |
98 /** |
98 /** |
99 * Removes a water depot. |
99 * Removes a water depot. |
100 * @param tile any tile of the water depot. |
100 * @param tile Any tile of the water depot. |
101 * @pre AIMap::IsValidTile(tile). |
101 * @pre AIMap::IsValidTile(tile). |
102 * @return whether the water depot has been/can be removed or not. |
102 * @return Whether the water depot has been/can be removed or not. |
103 */ |
103 */ |
104 static bool RemoveWaterDepot(TileIndex tile); |
104 static bool RemoveWaterDepot(TileIndex tile); |
105 |
105 |
106 /** |
106 /** |
107 * Removes a dock. |
107 * Removes a dock. |
108 * @param tile any tile of the dock. |
108 * @param tile Any tile of the dock. |
109 * @pre AIMap::IsValidTile(tile). |
109 * @pre AIMap::IsValidTile(tile). |
110 * @return whether the dock has been/can be removed or not. |
110 * @return Whether the dock has been/can be removed or not. |
111 */ |
111 */ |
112 static bool RemoveDock(TileIndex tile); |
112 static bool RemoveDock(TileIndex tile); |
113 |
113 |
114 /** |
114 /** |
115 * Removes a buoy. |
115 * Removes a buoy. |
116 * @param tile any tile of the buoy. |
116 * @param tile Any tile of the buoy. |
117 * @pre AIMap::IsValidTile(tile). |
117 * @pre AIMap::IsValidTile(tile). |
118 * @return whether the buoy has been/can be removed or not. |
118 * @return Whether the buoy has been/can be removed or not. |
119 */ |
119 */ |
120 static bool RemoveBuoy(TileIndex tile); |
120 static bool RemoveBuoy(TileIndex tile); |
121 |
121 |
122 /** |
122 /** |
123 * Removes a lock. |
123 * Removes a lock. |
124 * @param tile any tile of the lock. |
124 * @param tile Any tile of the lock. |
125 * @pre AIMap::IsValidTile(tile). |
125 * @pre AIMap::IsValidTile(tile). |
126 * @return whether the lock has been/can be removed or not. |
126 * @return Whether the lock has been/can be removed or not. |
127 */ |
127 */ |
128 static bool RemoveLock(TileIndex tile); |
128 static bool RemoveLock(TileIndex tile); |
129 |
129 |
130 /** |
130 /** |
131 * Removes a canal. |
131 * Removes a canal. |
132 * @param tile any tile of the canal. |
132 * @param tile Any tile of the canal. |
133 * @pre AIMap::IsValidTile(tile). |
133 * @pre AIMap::IsValidTile(tile). |
134 * @return whether the canal has been/can be removed or not. |
134 * @return Whether the canal has been/can be removed or not. |
135 */ |
135 */ |
136 static bool RemoveCanal(TileIndex tile); |
136 static bool RemoveCanal(TileIndex tile); |
137 }; |
137 }; |
138 |
138 |
139 #endif /* AI_MARINE_HPP */ |
139 #endif /* AI_MARINE_HPP */ |