| 1 | package com.takenoko.engine; | |
| 2 | ||
| 3 | import com.takenoko.actors.Gardener; | |
| 4 | import com.takenoko.actors.Panda; | |
| 5 | import com.takenoko.asset.GameAssets; | |
| 6 | import com.takenoko.layers.bamboo.BambooLayer; | |
| 7 | import com.takenoko.layers.bamboo.LayerBambooStack; | |
| 8 | import com.takenoko.layers.irrigation.EdgePosition; | |
| 9 | import com.takenoko.layers.irrigation.IrrigationLayer; | |
| 10 | import com.takenoko.layers.tile.ImprovementType; | |
| 11 | import com.takenoko.layers.tile.Tile; | |
| 12 | import com.takenoko.layers.tile.TileLayer; | |
| 13 | import com.takenoko.objective.Objective; | |
| 14 | import com.takenoko.objective.ObjectiveType; | |
| 15 | import com.takenoko.stats.BoardStatistics; | |
| 16 | import com.takenoko.vector.PositionVector; | |
| 17 | import com.takenoko.weather.Weather; | |
| 18 | import java.util.*; | |
| 19 | ||
| 20 | /** Board class. The board contains the tiles. */ | |
| 21 | public class Board { | |
| 22 | private final TileLayer tileLayer; | |
| 23 | private final BambooLayer bambooLayer; | |
| 24 | private final IrrigationLayer irrigationLayer; | |
| 25 | private final Panda panda; | |
| 26 | private final Gardener gardener; | |
| 27 | private final GameAssets gameAssets; | |
| 28 | private Weather weather = null; | |
| 29 | int roundNumber = 0; | |
| 30 | private final BoardStatistics boardStatistics; | |
| 31 | ||
| 32 | /** | |
| 33 | * Constructor for the Board class. | |
| 34 | * | |
| 35 | * @param tileLayer the tile layer | |
| 36 | * @param bambooLayer the bamboo layer | |
| 37 | * @param panda the panda | |
| 38 | * @param gardener the gardener | |
| 39 | * @param gameAssets the game assets : dice | |
| 40 | * @param irrigationLayer the irrigation layer | |
| 41 | */ | |
| 42 | public Board( | |
| 43 | TileLayer tileLayer, | |
| 44 | BambooLayer bambooLayer, | |
| 45 | Panda panda, | |
| 46 | Gardener gardener, | |
| 47 | GameAssets gameAssets, | |
| 48 | IrrigationLayer irrigationLayer, | |
| 49 | BoardStatistics boardStatistics) { | |
| 50 | this.tileLayer = tileLayer; | |
| 51 | this.bambooLayer = bambooLayer; | |
| 52 | this.panda = panda; | |
| 53 | this.gardener = gardener; | |
| 54 | this.gameAssets = gameAssets; | |
| 55 | this.irrigationLayer = irrigationLayer; | |
| 56 | this.boardStatistics = boardStatistics; | |
| 57 | } | |
| 58 | ||
| 59 | public void rollWeather() { | |
| 60 | gameAssets.getWeatherDice().rollWeather(); | |
| 61 | } | |
| 62 | ||
| 63 | public Weather peekWeather() { | |
| 64 |
1
1. peekWeather : replaced return value with null for com/takenoko/engine/Board::peekWeather → KILLED |
return gameAssets.getWeatherDice().peekWeather(); |
| 65 | } | |
| 66 | ||
| 67 | /** Constructor for the Board class. */ | |
| 68 | public Board() { | |
| 69 | this( | |
| 70 | new TileLayer(), | |
| 71 | new BambooLayer(), | |
| 72 | new Panda(), | |
| 73 | new Gardener(), | |
| 74 | new GameAssets(), | |
| 75 | new IrrigationLayer(), | |
| 76 | new BoardStatistics()); | |
| 77 | } | |
| 78 | ||
| 79 | public Board(Board board) { | |
| 80 | this.tileLayer = board.tileLayer.copy(); | |
| 81 | this.bambooLayer = board.bambooLayer.copy(); | |
| 82 | this.panda = board.panda.copy(); | |
| 83 | this.gardener = board.gardener.copy(); | |
| 84 | this.gameAssets = board.gameAssets.copy(); | |
| 85 | this.weather = board.weather; | |
| 86 | this.irrigationLayer = board.irrigationLayer.copy(); | |
| 87 | this.roundNumber = board.roundNumber; | |
| 88 | this.boardStatistics = board.boardStatistics; | |
| 89 | } | |
| 90 | ||
| 91 | /** | |
| 92 | * Return the list of available tiles. | |
| 93 | * | |
| 94 | * @return the list of available tiles | |
| 95 | */ | |
| 96 | public List<Tile> getAvailableTiles() { | |
| 97 |
1
1. getAvailableTiles : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getAvailableTiles → KILLED |
return tileLayer.getAvailableTiles(); |
| 98 | } | |
| 99 | ||
| 100 | /** | |
| 101 | * Returns a copy of the hashmap of tiles. | |
| 102 | * | |
| 103 | * @return the map of tiles | |
| 104 | */ | |
| 105 | public Map<PositionVector, Tile> getTiles() { | |
| 106 |
1
1. getTiles : replaced return value with Collections.emptyMap for com/takenoko/engine/Board::getTiles → KILLED |
return new HashMap<>(tileLayer.getTiles()); |
| 107 | } | |
| 108 | ||
| 109 | /** | |
| 110 | * Returns the available tile positions. | |
| 111 | * | |
| 112 | * @return the available tile positions | |
| 113 | */ | |
| 114 | public List<PositionVector> getAvailableTilePositions() { | |
| 115 |
1
1. getAvailableTilePositions : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getAvailableTilePositions → KILLED |
return tileLayer.getAvailableTilePositions(); |
| 116 | } | |
| 117 | ||
| 118 | /** | |
| 119 | * Returns a copy of the hashmap of tiles without the pond. | |
| 120 | * | |
| 121 | * @return the map of tiles without the pond | |
| 122 | */ | |
| 123 | public Map<PositionVector, Tile> getTilesWithoutPond() { | |
| 124 |
1
1. getTilesWithoutPond : replaced return value with Collections.emptyMap for com/takenoko/engine/Board::getTilesWithoutPond → KILLED |
return new HashMap<>(tileLayer.getTilesWithoutPond()); |
| 125 | } | |
| 126 | ||
| 127 | /** | |
| 128 | * Returns if the position is a tile. | |
| 129 | * | |
| 130 | * @param positionVector the position of the tile | |
| 131 | * @return if there is a tile at the position | |
| 132 | */ | |
| 133 | public boolean isTile(PositionVector positionVector) { | |
| 134 |
2
1. isTile : replaced boolean return with false for com/takenoko/engine/Board::isTile → KILLED 2. isTile : replaced boolean return with true for com/takenoko/engine/Board::isTile → KILLED |
return tileLayer.isTile(positionVector); |
| 135 | } | |
| 136 | ||
| 137 | /** | |
| 138 | * Returns the tile at the position. | |
| 139 | * | |
| 140 | * @param positionVector the position of the tile | |
| 141 | * @return the tile at the position | |
| 142 | */ | |
| 143 | public Tile getTileAt(PositionVector positionVector) { | |
| 144 |
1
1. getTileAt : replaced return value with null for com/takenoko/engine/Board::getTileAt → KILLED |
return tileLayer.getTileAt(positionVector); |
| 145 | } | |
| 146 | ||
| 147 | /** | |
| 148 | * Place a tile on the board. and update the available tiles and the available tile positions. | |
| 149 | * | |
| 150 | * @param tile the tile to add to the board | |
| 151 | * @param position the position of the tile | |
| 152 | * @return the LayerBambooStack at the position of the tile | |
| 153 | */ | |
| 154 | public LayerBambooStack placeTile(Tile tile, PositionVector position) { | |
| 155 |
1
1. placeTile : replaced return value with null for com/takenoko/engine/Board::placeTile → KILLED |
return tileLayer.placeTile(tile, position, this); |
| 156 | } | |
| 157 | ||
| 158 | /** | |
| 159 | * Get the bamboo stack at the position. | |
| 160 | * | |
| 161 | * @param positionVector the position of the tile | |
| 162 | */ | |
| 163 | public LayerBambooStack getBambooAt(PositionVector positionVector) { | |
| 164 |
1
1. getBambooAt : replaced return value with null for com/takenoko/engine/Board::getBambooAt → KILLED |
return bambooLayer.getBambooAt(positionVector, this); |
| 165 | } | |
| 166 | ||
| 167 | /** | |
| 168 | * Grow bamboo on a tile. By default, the number of bamboo is 1 if the tile is irrigated. | |
| 169 | * | |
| 170 | * @param positionVector the position of the tile | |
| 171 | * @return the bamboo stack at the position | |
| 172 | */ | |
| 173 | public LayerBambooStack growBamboo(PositionVector positionVector) { | |
| 174 |
1
1. growBamboo : replaced return value with null for com/takenoko/engine/Board::growBamboo → KILLED |
return bambooLayer.growBamboo(positionVector, this); |
| 175 | } | |
| 176 | ||
| 177 | /** | |
| 178 | * Eat a bamboo from a tile. | |
| 179 | * | |
| 180 | * @param positionVector the position of the tile | |
| 181 | */ | |
| 182 | public void eatBamboo(PositionVector positionVector) { | |
| 183 |
1
1. eatBamboo : removed call to com/takenoko/layers/bamboo/BambooLayer::eatBamboo → KILLED |
bambooLayer.eatBamboo(positionVector, this); |
| 184 | } | |
| 185 | ||
| 186 | /** | |
| 187 | * Check if the bamboo at the position is eatable. | |
| 188 | * | |
| 189 | * @param positionVector the position of the tile | |
| 190 | * @return if the bamboo at the position is eatable | |
| 191 | */ | |
| 192 | public boolean isBambooEatableAt(PositionVector positionVector) { | |
| 193 |
2
1. isBambooEatableAt : replaced boolean return with false for com/takenoko/engine/Board::isBambooEatableAt → TIMED_OUT 2. isBambooEatableAt : replaced boolean return with true for com/takenoko/engine/Board::isBambooEatableAt → KILLED |
return bambooLayer.isEatableAt(positionVector, this); |
| 194 | } | |
| 195 | ||
| 196 | /** Get the Position of the Panda */ | |
| 197 | public PositionVector getPandaPosition() { | |
| 198 |
1
1. getPandaPosition : replaced return value with null for com/takenoko/engine/Board::getPandaPosition → KILLED |
return panda.getPosition(); |
| 199 | } | |
| 200 | ||
| 201 | /** Get the Position of the Gardener */ | |
| 202 | public PositionVector getGardenerPosition() { | |
| 203 |
1
1. getGardenerPosition : replaced return value with null for com/takenoko/engine/Board::getGardenerPosition → KILLED |
return gardener.getPosition(); |
| 204 | } | |
| 205 | ||
| 206 | /** | |
| 207 | * Returns possible moves for the panda. | |
| 208 | * | |
| 209 | * @return the possible moves | |
| 210 | */ | |
| 211 | public List<PositionVector> getPandaPossibleMoves() { | |
| 212 |
1
1. getPandaPossibleMoves : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getPandaPossibleMoves → KILLED |
return panda.getPossibleMoves(this); |
| 213 | } | |
| 214 | ||
| 215 | /** | |
| 216 | * Returns possible moves for the gardener. | |
| 217 | * | |
| 218 | * @return the possible moves | |
| 219 | */ | |
| 220 | public List<PositionVector> getGardenerPossibleMoves() { | |
| 221 |
1
1. getGardenerPossibleMoves : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getGardenerPossibleMoves → KILLED |
return gardener.getPossibleMoves(this); |
| 222 | } | |
| 223 | ||
| 224 | /** | |
| 225 | * Move the panda with a vector. | |
| 226 | * | |
| 227 | * @param vector the vector to move the panda | |
| 228 | * @return bamboo stack of one if the panda ate bamboo | |
| 229 | */ | |
| 230 | public Map<PositionVector, LayerBambooStack> movePanda(PositionVector vector) { | |
| 231 |
1
1. movePanda : replaced return value with Collections.emptyMap for com/takenoko/engine/Board::movePanda → KILLED |
return panda.move(vector, this); |
| 232 | } | |
| 233 | ||
| 234 | /** | |
| 235 | * Move the gardener with a vector. | |
| 236 | * | |
| 237 | * @param vector the vector to move the gardener | |
| 238 | * @return bamboo stack of one if the gardener planted bamboo | |
| 239 | */ | |
| 240 | public Map<PositionVector, LayerBambooStack> moveGardener(PositionVector vector) { | |
| 241 |
1
1. moveGardener : replaced return value with Collections.emptyMap for com/takenoko/engine/Board::moveGardener → TIMED_OUT |
return gardener.move(vector, this); |
| 242 | } | |
| 243 | ||
| 244 | @Override | |
| 245 | public boolean equals(Object o) { | |
| 246 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for com/takenoko/engine/Board::equals → KILLED |
if (this == o) return true; |
| 247 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for com/takenoko/engine/Board::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
| 248 | Board board = (Board) o; | |
| 249 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for com/takenoko/engine/Board::equals → KILLED |
return tileLayer.equals(board.tileLayer) |
| 250 |
1
1. equals : negated conditional → KILLED |
&& bambooLayer.equals(board.bambooLayer) |
| 251 |
1
1. equals : negated conditional → KILLED |
&& panda.equals(board.panda) |
| 252 |
1
1. equals : negated conditional → KILLED |
&& gardener.equals((board.gardener)) |
| 253 |
1
1. equals : negated conditional → KILLED |
&& gameAssets.equals(board.gameAssets) |
| 254 |
1
1. equals : negated conditional → KILLED |
&& Objects.equals(weather, board.weather) |
| 255 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : negated conditional → KILLED |
&& irrigationLayer.equals(board.irrigationLayer) |
| 256 | && roundNumber == board.roundNumber | |
| 257 | && boardStatistics == board.boardStatistics; | |
| 258 | } | |
| 259 | ||
| 260 | @Override | |
| 261 | public int hashCode() { | |
| 262 |
1
1. hashCode : replaced int return with 0 for com/takenoko/engine/Board::hashCode → KILLED |
return Objects.hash( |
| 263 | tileLayer, | |
| 264 | bambooLayer, | |
| 265 | panda, | |
| 266 | gardener, | |
| 267 | gameAssets, | |
| 268 | weather, | |
| 269 | irrigationLayer, | |
| 270 | roundNumber, | |
| 271 | boardStatistics); | |
| 272 | } | |
| 273 | ||
| 274 | public Board copy() { | |
| 275 |
1
1. copy : replaced return value with null for com/takenoko/engine/Board::copy → KILLED |
return new Board(this); |
| 276 | } | |
| 277 | ||
| 278 | public Optional<Weather> getWeather() { | |
| 279 |
1
1. getWeather : replaced return value with Optional.empty for com/takenoko/engine/Board::getWeather → TIMED_OUT |
return Optional.ofNullable(weather); |
| 280 | } | |
| 281 | ||
| 282 | public void setWeather(Weather weather) { | |
| 283 | this.weather = weather; | |
| 284 | } | |
| 285 | ||
| 286 | /** Changes the weather to null. This is used when the weather is over. */ | |
| 287 | public void resetWeather() { | |
| 288 | weather = null; | |
| 289 | } | |
| 290 | ||
| 291 | public boolean isBambooGrowableAt(PositionVector positionVector) { | |
| 292 |
2
1. isBambooGrowableAt : replaced boolean return with true for com/takenoko/engine/Board::isBambooGrowableAt → TIMED_OUT 2. isBambooGrowableAt : replaced boolean return with false for com/takenoko/engine/Board::isBambooGrowableAt → KILLED |
return bambooLayer.isGrowableAt(positionVector, this); |
| 293 | } | |
| 294 | ||
| 295 | /** | |
| 296 | * @param improvementType the type of improvement | |
| 297 | * @return the improvement of the type | |
| 298 | */ | |
| 299 | public ImprovementType drawImprovement(ImprovementType improvementType) { | |
| 300 |
1
1. drawImprovement : replaced return value with null for com/takenoko/engine/Board::drawImprovement → TIMED_OUT |
return gameAssets.getImprovementDeck().draw(improvementType); |
| 301 | } | |
| 302 | ||
| 303 | /** | |
| 304 | * Returns last improvement drawn. | |
| 305 | * | |
| 306 | * @return the last improvement drawn | |
| 307 | */ | |
| 308 | public ImprovementType peekImprovement() { | |
| 309 |
1
1. peekImprovement : replaced return value with null for com/takenoko/engine/Board::peekImprovement → TIMED_OUT |
return gameAssets.getImprovementDeck().peek(); |
| 310 | } | |
| 311 | ||
| 312 | /** | |
| 313 | * @param improvementType the type of improvement | |
| 314 | * @return if the improvement is available | |
| 315 | */ | |
| 316 | public boolean hasImprovementInDeck(ImprovementType improvementType) { | |
| 317 |
2
1. hasImprovementInDeck : replaced boolean return with false for com/takenoko/engine/Board::hasImprovementInDeck → TIMED_OUT 2. hasImprovementInDeck : replaced boolean return with true for com/takenoko/engine/Board::hasImprovementInDeck → TIMED_OUT |
return gameAssets.getImprovementDeck().hasImprovement(improvementType); |
| 318 | } | |
| 319 | ||
| 320 | public List<PositionVector> getAvailableImprovementPositions() { | |
| 321 |
1
1. getAvailableImprovementPositions : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getAvailableImprovementPositions → TIMED_OUT |
return tileLayer.getAvailableImprovementPositions(this); |
| 322 | } | |
| 323 | ||
| 324 | public void drawTiles() { | |
| 325 |
1
1. drawTiles : removed call to com/takenoko/asset/TileDeck::draw → KILLED |
gameAssets.getTileDeck().draw(); |
| 326 | } | |
| 327 | ||
| 328 | public List<Tile> peekTileDeck() { | |
| 329 |
1
1. peekTileDeck : replaced return value with Collections.emptyList for com/takenoko/engine/Board::peekTileDeck → KILLED |
return gameAssets.getTileDeck().peek(); |
| 330 | } | |
| 331 | ||
| 332 | public void chooseTileInTileDeck(Tile tile) { | |
| 333 |
1
1. chooseTileInTileDeck : removed call to com/takenoko/asset/TileDeck::choose → TIMED_OUT |
gameAssets.getTileDeck().choose(tile); |
| 334 | } | |
| 335 | ||
| 336 | public boolean isTileDeckEmpty() { | |
| 337 |
2
1. isTileDeckEmpty : replaced boolean return with false for com/takenoko/engine/Board::isTileDeckEmpty → TIMED_OUT 2. isTileDeckEmpty : replaced boolean return with true for com/takenoko/engine/Board::isTileDeckEmpty → TIMED_OUT |
return gameAssets.getTileDeck().isEmpty(); |
| 338 | } | |
| 339 | ||
| 340 | public void applyImprovement(ImprovementType improvementType, PositionVector positionVector) { | |
| 341 |
1
1. applyImprovement : removed call to com/takenoko/layers/tile/TileLayer::applyImprovement → KILLED |
tileLayer.applyImprovement(improvementType, positionVector, this); |
| 342 | } | |
| 343 | ||
| 344 | public void drawObjective(ObjectiveType objectiveType) { | |
| 345 |
1
1. drawObjective : removed call to com/takenoko/asset/ObjectiveDeck::draw → KILLED |
gameAssets.getObjectiveDeck().draw(objectiveType); |
| 346 | } | |
| 347 | ||
| 348 | public Objective peekObjectiveDeck() { | |
| 349 |
1
1. peekObjectiveDeck : replaced return value with null for com/takenoko/engine/Board::peekObjectiveDeck → KILLED |
return gameAssets.getObjectiveDeck().peek(); |
| 350 | } | |
| 351 | ||
| 352 | public boolean isObjectiveDeckEmpty() { | |
| 353 |
2
1. isObjectiveDeckEmpty : replaced boolean return with false for com/takenoko/engine/Board::isObjectiveDeckEmpty → TIMED_OUT 2. isObjectiveDeckEmpty : replaced boolean return with true for com/takenoko/engine/Board::isObjectiveDeckEmpty → TIMED_OUT |
return gameAssets.getObjectiveDeck().isEmpty(); |
| 354 | } | |
| 355 | ||
| 356 | public void drawIrrigation() { | |
| 357 |
1
1. drawIrrigation : removed call to com/takenoko/asset/IrrigationDeck::draw → TIMED_OUT |
gameAssets.getIrrigationDeck().draw(); |
| 358 | } | |
| 359 | ||
| 360 | public boolean hasIrrigation() { | |
| 361 |
2
1. hasIrrigation : replaced boolean return with false for com/takenoko/engine/Board::hasIrrigation → TIMED_OUT 2. hasIrrigation : replaced boolean return with true for com/takenoko/engine/Board::hasIrrigation → TIMED_OUT |
return gameAssets.getIrrigationDeck().hasIrrigation(); |
| 362 | } | |
| 363 | ||
| 364 | public void updateAvailableIrrigationChannelPositions(PositionVector position) { | |
| 365 |
1
1. updateAvailableIrrigationChannelPositions : removed call to com/takenoko/layers/irrigation/IrrigationLayer::updateAvailableIrrigationChannelPositions → KILLED |
irrigationLayer.updateAvailableIrrigationChannelPositions(position, this); |
| 366 | } | |
| 367 | ||
| 368 | public void placeIrrigation(EdgePosition edgePosition) { | |
| 369 |
1
1. placeIrrigation : removed call to com/takenoko/layers/irrigation/IrrigationLayer::placeIrrigation → KILLED |
irrigationLayer.placeIrrigation(edgePosition, this); |
| 370 | } | |
| 371 | ||
| 372 | public List<EdgePosition> getAvailableIrrigationPositions() { | |
| 373 |
1
1. getAvailableIrrigationPositions : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getAvailableIrrigationPositions → KILLED |
return irrigationLayer.getAvailableEdgePositions().stream().toList(); |
| 374 | } | |
| 375 | ||
| 376 | public boolean isIrrigatedAt(PositionVector position) { | |
| 377 |
2
1. isIrrigatedAt : replaced boolean return with false for com/takenoko/engine/Board::isIrrigatedAt → KILLED 2. isIrrigatedAt : replaced boolean return with true for com/takenoko/engine/Board::isIrrigatedAt → KILLED |
return irrigationLayer.isIrrigatedAt(position); |
| 378 | } | |
| 379 | ||
| 380 | public int getRoundNumber() { | |
| 381 |
1
1. getRoundNumber : replaced int return with 0 for com/takenoko/engine/Board::getRoundNumber → KILLED |
return roundNumber; |
| 382 | } | |
| 383 | ||
| 384 | public void nextRound() { | |
| 385 |
1
1. nextRound : Replaced integer addition with subtraction → KILLED |
roundNumber++; |
| 386 | } | |
| 387 | ||
| 388 | public List<PositionVector> getGrowablePositions() { | |
| 389 |
1
1. getGrowablePositions : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getGrowablePositions → TIMED_OUT |
return bambooLayer.getGrowablePositions(this); |
| 390 | } | |
| 391 | ||
| 392 | /** | |
| 393 | * Return the list of objectives for the starting deck | |
| 394 | * | |
| 395 | * @return list of objectives | |
| 396 | */ | |
| 397 | public List<Objective> getStarterDeck() { | |
| 398 |
1
1. getStarterDeck : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getStarterDeck → TIMED_OUT |
return gameAssets.getStarterDeck(); |
| 399 | } | |
| 400 | ||
| 401 | public BoardStatistics getBoardStatistics() { | |
| 402 |
1
1. getBoardStatistics : replaced return value with null for com/takenoko/engine/Board::getBoardStatistics → KILLED |
return boardStatistics; |
| 403 | } | |
| 404 | ||
| 405 | public void analyze() { | |
| 406 |
1
1. analyze : removed call to com/takenoko/stats/BoardStatistics::analyzeBoard → TIMED_OUT |
boardStatistics.analyzeBoard(this); |
| 407 | } | |
| 408 | ||
| 409 | public List<EdgePosition> getPlacedIrrigations() { | |
| 410 |
1
1. getPlacedIrrigations : replaced return value with Collections.emptyList for com/takenoko/engine/Board::getPlacedIrrigations → TIMED_OUT |
return irrigationLayer.getIrrigationChannelsPositions().stream().toList(); |
| 411 | } | |
| 412 | ||
| 413 | public boolean hasImprovementInDeck() { | |
| 414 |
2
1. hasImprovementInDeck : negated conditional → NO_COVERAGE 2. hasImprovementInDeck : replaced boolean return with true for com/takenoko/engine/Board::hasImprovementInDeck → NO_COVERAGE |
return !gameAssets.getImprovementDeck().isEmpty(); |
| 415 | } | |
| 416 | ||
| 417 | public boolean hasObjectiveTypeInDeck(ObjectiveType objectiveType) { | |
| 418 |
2
1. hasObjectiveTypeInDeck : replaced boolean return with false for com/takenoko/engine/Board::hasObjectiveTypeInDeck → KILLED 2. hasObjectiveTypeInDeck : replaced boolean return with true for com/takenoko/engine/Board::hasObjectiveTypeInDeck → KILLED |
return gameAssets.hasObjectiveTypeInDeck(objectiveType); |
| 419 | } | |
| 420 | } | |
Mutations | ||
| 64 |
1.1 |
|
| 97 |
1.1 |
|
| 106 |
1.1 |
|
| 115 |
1.1 |
|
| 124 |
1.1 |
|
| 134 |
1.1 2.2 |
|
| 144 |
1.1 |
|
| 155 |
1.1 |
|
| 164 |
1.1 |
|
| 174 |
1.1 |
|
| 183 |
1.1 |
|
| 193 |
1.1 2.2 |
|
| 198 |
1.1 |
|
| 203 |
1.1 |
|
| 212 |
1.1 |
|
| 221 |
1.1 |
|
| 231 |
1.1 |
|
| 241 |
1.1 |
|
| 246 |
1.1 2.2 |
|
| 247 |
1.1 2.2 3.3 |
|
| 249 |
1.1 2.2 |
|
| 250 |
1.1 |
|
| 251 |
1.1 |
|
| 252 |
1.1 |
|
| 253 |
1.1 |
|
| 254 |
1.1 |
|
| 255 |
1.1 2.2 3.3 |
|
| 262 |
1.1 |
|
| 275 |
1.1 |
|
| 279 |
1.1 |
|
| 292 |
1.1 2.2 |
|
| 300 |
1.1 |
|
| 309 |
1.1 |
|
| 317 |
1.1 2.2 |
|
| 321 |
1.1 |
|
| 325 |
1.1 |
|
| 329 |
1.1 |
|
| 333 |
1.1 |
|
| 337 |
1.1 2.2 |
|
| 341 |
1.1 |
|
| 345 |
1.1 |
|
| 349 |
1.1 |
|
| 353 |
1.1 2.2 |
|
| 357 |
1.1 |
|
| 361 |
1.1 2.2 |
|
| 365 |
1.1 |
|
| 369 |
1.1 |
|
| 373 |
1.1 |
|
| 377 |
1.1 2.2 |
|
| 381 |
1.1 |
|
| 385 |
1.1 |
|
| 389 |
1.1 |
|
| 398 |
1.1 |
|
| 402 |
1.1 |
|
| 406 |
1.1 |
|
| 410 |
1.1 |
|
| 414 |
1.1 2.2 |
|
| 418 |
1.1 2.2 |