| 1 | package com.takenoko.engine; | |
| 2 | ||
| 3 | import com.takenoko.bot.ColletBot; | |
| 4 | import com.takenoko.bot.GeneralTacticBot; | |
| 5 | import com.takenoko.objective.EmperorObjective; | |
| 6 | import com.takenoko.objective.Objective; | |
| 7 | import com.takenoko.stats.BotCSVExporter; | |
| 8 | import com.takenoko.stats.BotStatistics; | |
| 9 | import com.takenoko.stats.SingleBotStatistics; | |
| 10 | import com.takenoko.ui.ConsoleUserInterface; | |
| 11 | import java.util.*; | |
| 12 | import java.util.stream.Collectors; | |
| 13 | import org.apache.commons.lang3.tuple.Pair; | |
| 14 | ||
| 15 | /** The game engine is responsible for the gameplay throughout the game. */ | |
| 16 | public class GameEngine { | |
| 17 | // ATTRIBUTES | |
| 18 | public static final int DEFAULT_NUMBER_OF_ROUNDS = 200; | |
| 19 | public static final Map<Integer, Integer> DEFAULT_NUMBER_OF_OBJECTIVES_TO_WIN = | |
| 20 | Map.of(2, 9, 3, 8, 4, 7); | |
| 21 | private Board board; | |
| 22 | private final ConsoleUserInterface consoleUserInterface; | |
| 23 | private GameState gameState; | |
| 24 | private final int numberOfRounds; | |
| 25 | private final List<BotManager> botManagers; | |
| 26 | private final Scoreboard scoreboard; | |
| 27 | private final BotStatistics botStatistics; | |
| 28 | private final History history; | |
| 29 | ||
| 30 | public GameEngine( | |
| 31 | int numberOfRounds, | |
| 32 | Board board, | |
| 33 | ConsoleUserInterface consoleUserInterface, | |
| 34 | GameState gameState, | |
| 35 | List<BotManager> botManagerList, | |
| 36 | Scoreboard scoreboard, | |
| 37 | BotStatistics botStatistics, | |
| 38 | History history) { | |
| 39 | // Assign values to the attributes | |
| 40 | this.numberOfRounds = numberOfRounds; | |
| 41 | this.board = board; | |
| 42 | this.consoleUserInterface = consoleUserInterface; | |
| 43 | this.gameState = gameState; | |
| 44 | this.botManagers = botManagerList; | |
| 45 | this.scoreboard = scoreboard; | |
| 46 | this.botStatistics = botStatistics; | |
| 47 | this.history = history; | |
| 48 |
1
1. <init> : removed call to com/takenoko/engine/Scoreboard::addBotManager → KILLED |
scoreboard.addBotManager(botManagerList); |
| 49 |
1
1. <init> : removed call to com/takenoko/stats/BotStatistics::addBotManagers → KILLED |
botStatistics.addBotManagers(botManagerList); |
| 50 | } | |
| 51 | ||
| 52 | /** | |
| 53 | * Constructor for the GameEngine class. Instantiate the board and the console user interface | |
| 54 | * used. It does not start the game ! It simply instantiates the objects needed for the game. | |
| 55 | */ | |
| 56 | public GameEngine() { | |
| 57 | this( | |
| 58 | DEFAULT_NUMBER_OF_ROUNDS, | |
| 59 | new Board(), | |
| 60 | new ConsoleUserInterface(), | |
| 61 | GameState.INITIALIZED, | |
| 62 | new ArrayList<>( | |
| 63 | List.of( | |
| 64 | new BotManager( | |
| 65 | new ConsoleUserInterface(), | |
| 66 | "ColletBot", | |
| 67 | new ColletBot(), | |
| 68 | new BotState(), | |
| 69 | new SingleBotStatistics()), | |
| 70 | new BotManager( | |
| 71 | new ConsoleUserInterface(), | |
| 72 | "GeneralTactic", | |
| 73 | new GeneralTacticBot(), | |
| 74 | new BotState(), | |
| 75 | new SingleBotStatistics()))), | |
| 76 | new Scoreboard(), | |
| 77 | new BotStatistics(), | |
| 78 | new History()); | |
| 79 | } | |
| 80 | ||
| 81 | public GameEngine(List<BotManager> botManagers) { | |
| 82 | this( | |
| 83 | DEFAULT_NUMBER_OF_ROUNDS, | |
| 84 | new Board(), | |
| 85 | new ConsoleUserInterface(), | |
| 86 | GameState.INITIALIZED, | |
| 87 | botManagers, | |
| 88 | new Scoreboard(), | |
| 89 | new BotStatistics(), | |
| 90 | new History()); | |
| 91 | } | |
| 92 | ||
| 93 | /** | |
| 94 | * This method creates a blank new game. | |
| 95 | * | |
| 96 | * <ol> | |
| 97 | * <li>Display the welcome message | |
| 98 | * <li>Change game state to READY | |
| 99 | * <li>Tell the user that the game is setup | |
| 100 | * </ol> | |
| 101 | */ | |
| 102 | public void newGame() { | |
| 103 |
1
1. newGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayLineSeparator → KILLED |
consoleUserInterface.displayLineSeparator(); |
| 104 | ||
| 105 |
2
1. newGame : negated conditional → KILLED 2. newGame : negated conditional → KILLED |
if (gameState != GameState.INITIALIZED && gameState != GameState.FINISHED) { |
| 106 | throw new IllegalStateException( | |
| 107 | "The game is already started. You must end the game first."); | |
| 108 | } | |
| 109 | ||
| 110 |
1
1. newGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → KILLED |
consoleUserInterface.displayMessage("Welcome to Takenoko!"); |
| 111 | ||
| 112 | // Reset all the attributes that needs to be | |
| 113 | this.board = new Board(); | |
| 114 |
1
1. newGame : removed call to com/takenoko/engine/History::clear → TIMED_OUT |
this.history.clear(); |
| 115 | ||
| 116 | for (BotManager botManager : botManagers) { | |
| 117 |
1
1. newGame : removed call to com/takenoko/engine/BotManager::reset → KILLED |
botManager.reset(); |
| 118 |
1
1. newGame : removed call to com/takenoko/engine/BotManager::setStartingDeck → TIMED_OUT |
botManager.setStartingDeck(board.getStarterDeck()); |
| 119 |
1
1. newGame : removed call to com/takenoko/engine/History::addBotManager → KILLED |
history.addBotManager(botManager); |
| 120 | } | |
| 121 | ||
| 122 | // Game is now ready to be started | |
| 123 | gameState = GameState.READY; | |
| 124 |
1
1. newGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → KILLED |
consoleUserInterface.displayMessage( |
| 125 | "The new game has been set up. You can start the game !"); | |
| 126 | } | |
| 127 | ||
| 128 | /** This method change the game state to playing and add the first tile to the board. */ | |
| 129 | public void startGame() { | |
| 130 |
1
1. startGame : negated conditional → KILLED |
if (gameState == GameState.INITIALIZED) { |
| 131 | throw new IllegalStateException( | |
| 132 | "The game is not ready yet. You must first create a new game."); | |
| 133 | } | |
| 134 |
1
1. startGame : negated conditional → KILLED |
if (gameState != GameState.READY) { |
| 135 | throw new IllegalStateException( | |
| 136 | "The game is already started. You must create a new game to call this method."); | |
| 137 | } | |
| 138 | ||
| 139 | gameState = GameState.PLAYING; | |
| 140 |
1
1. startGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → KILLED |
consoleUserInterface.displayMessage("The game has started !"); |
| 141 | } | |
| 142 | ||
| 143 | public void playGame() { | |
| 144 | boolean isLastRound = false; | |
| 145 | BotManager botManagerWithEmperorObjective = null; | |
| 146 | ||
| 147 |
2
1. playGame : changed conditional boundary → KILLED 2. playGame : negated conditional → KILLED |
for (int i = 0; i < numberOfRounds; i++) { |
| 148 |
1
1. playGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → KILLED |
consoleUserInterface.displayMessage( |
| 149 |
1
1. playGame : Replaced integer addition with subtraction → KILLED |
"===== Round " + (board.getRoundNumber() + 1) + " ====="); |
| 150 | for (BotManager botManager : botManagers) { | |
| 151 | ||
| 152 |
2
1. playGame : negated conditional → TIMED_OUT 2. playGame : negated conditional → TIMED_OUT |
if (isLastRound && botManager.equals(botManagerWithEmperorObjective)) { |
| 153 | gameState = GameState.FINISHED; | |
| 154 |
1
1. playGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → TIMED_OUT |
consoleUserInterface.displayMessage("===== Game finished ====="); |
| 155 | return; | |
| 156 | } | |
| 157 |
1
1. playGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → TIMED_OUT |
consoleUserInterface.displayMessage( |
| 158 | "===== <" + botManager.getName() + "> is playing ====="); | |
| 159 |
1
1. playGame : removed call to com/takenoko/engine/History::setCurrentBotManagerUUID → TIMED_OUT |
history.setCurrentBotManagerUUID(botManager.getUniqueID()); |
| 160 |
1
1. playGame : removed call to com/takenoko/engine/BotManager::playBot → KILLED |
botManager.playBot(board, history.copy()); |
| 161 | ||
| 162 | if (botManager.getRedeemedObjectives().size() | |
| 163 |
3
1. playGame : changed conditional boundary → KILLED 2. playGame : negated conditional → KILLED 3. playGame : negated conditional → KILLED |
>= DEFAULT_NUMBER_OF_OBJECTIVES_TO_WIN.get(botManagers.size()) |
| 164 | && !isLastRound) { | |
| 165 |
1
1. playGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → TIMED_OUT |
consoleUserInterface.displayMessage( |
| 166 | "===== <" + botManager.getName() + "> finished the game ====="); | |
| 167 | Objective objective = new EmperorObjective(); | |
| 168 |
1
1. playGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → TIMED_OUT |
consoleUserInterface.displayMessage( |
| 169 | botManager.getName() + " received the Emperor objective !"); | |
| 170 |
1
1. playGame : removed call to com/takenoko/engine/BotManager::addObjective → TIMED_OUT |
botManager.addObjective(objective); |
| 171 |
1
1. playGame : removed call to com/takenoko/engine/BotManager::setObjectiveAchieved → TIMED_OUT |
botManager.setObjectiveAchieved(objective); |
| 172 |
1
1. playGame : removed call to com/takenoko/engine/BotManager::redeemObjective → TIMED_OUT |
botManager.redeemObjective(objective); |
| 173 | botManagerWithEmperorObjective = botManager; | |
| 174 | isLastRound = true; | |
| 175 |
1
1. playGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → KILLED |
consoleUserInterface.displayMessage( |
| 176 | "==<Last round>==<Last round>==<Last round>==<Last round>=="); | |
| 177 | } | |
| 178 | } | |
| 179 |
1
1. playGame : removed call to com/takenoko/engine/Board::nextRound → TIMED_OUT |
board.nextRound(); |
| 180 | } | |
| 181 | } | |
| 182 | ||
| 183 | /** This method is used to end the game correctly. */ | |
| 184 | public void endGame() { | |
| 185 |
2
1. endGame : negated conditional → KILLED 2. endGame : negated conditional → KILLED |
if (gameState != GameState.PLAYING && gameState != GameState.FINISHED) { |
| 186 | throw new IllegalStateException( | |
| 187 | "The game is not started yet. You must first start the game."); | |
| 188 | } | |
| 189 | Pair<List<BotManager>, EndGameState> winner = getWinner(); | |
| 190 | ||
| 191 | switch (winner.getRight()) { | |
| 192 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → TIMED_OUT |
case WIN_WITH_OBJECTIVE_POINTS -> consoleUserInterface.displayMessage( |
| 193 | "The winner is " | |
| 194 | + winner.getLeft().get(0).getName() | |
| 195 | + " with " | |
| 196 | + winner.getLeft().get(0).getObjectiveScore() | |
| 197 | + " points ! " | |
| 198 | + "With the following objectives : " | |
| 199 | + winner.getLeft().get(0).getRedeemedObjectives().stream() | |
| 200 | .map(Object::toString) | |
| 201 | .collect(Collectors.joining(", "))); | |
| 202 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → SURVIVED |
case TIE -> consoleUserInterface.displayMessage( |
| 203 | "It's a tie !, the winners are : " | |
| 204 | + winner.getLeft().stream() | |
| 205 | .map(BotManager::getName) | |
| 206 | .collect(Collectors.joining(", "))); | |
| 207 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → SURVIVED |
case WIN_WITH_PANDA_OBJECTIVE_POINTS -> consoleUserInterface.displayMessage( |
| 208 | "The winner is " | |
| 209 | + winner.getLeft().get(0).getName() | |
| 210 | + " with " | |
| 211 | + winner.getLeft().get(0).getPandaObjectiveScore() | |
| 212 | + " points ! " | |
| 213 | + "With the following objectives : " | |
| 214 | + winner.getLeft().get(0).getRedeemedObjectives().stream() | |
| 215 | .map(Object::toString) | |
| 216 | .collect(Collectors.joining(", "))); | |
| 217 | default -> throw new IllegalStateException("Unexpected value: " + winner.getRight()); | |
| 218 | } | |
| 219 | ||
| 220 | for (BotManager botManager : winner.getLeft()) { | |
| 221 |
1
1. endGame : removed call to com/takenoko/engine/Scoreboard::incrementNumberOfVictory → KILLED |
scoreboard.incrementNumberOfVictory(botManager); |
| 222 |
1
1. endGame : removed call to com/takenoko/stats/BotStatistics::incrementWins → KILLED |
botStatistics.incrementWins(botManager); |
| 223 | } | |
| 224 | for (BotManager botManager : botManagers) { | |
| 225 |
1
1. endGame : negated conditional → KILLED |
if (!winner.getLeft().contains(botManager)) { |
| 226 |
1
1. endGame : removed call to com/takenoko/stats/BotStatistics::incrementLosses → TIMED_OUT |
botStatistics.incrementLosses(botManager); |
| 227 | } | |
| 228 | } | |
| 229 | for (BotManager botManager : botManagers) { | |
| 230 |
1
1. endGame : removed call to com/takenoko/engine/Scoreboard::updateScore → TIMED_OUT |
scoreboard.updateScore(botManager, botManager.getObjectiveScore()); |
| 231 |
1
1. endGame : removed call to com/takenoko/stats/BotStatistics::updateScore → KILLED |
botStatistics.updateScore(botManager, botManager.getObjectiveScore()); |
| 232 | } | |
| 233 |
1
1. endGame : removed call to com/takenoko/engine/Board::analyze → TIMED_OUT |
board.analyze(); |
| 234 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayFullStats → KILLED |
consoleUserInterface.displayFullStats(botStatistics.toString()); |
| 235 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayFullStats → KILLED |
consoleUserInterface.displayFullStats(history.getHistoryStatistics().toString()); |
| 236 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayFullStats → KILLED |
consoleUserInterface.displayFullStats(board.getBoardStatistics().toString()); |
| 237 |
1
1. endGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayMessage → KILLED |
consoleUserInterface.displayMessage("The game is finished. Thanks for playing !"); |
| 238 | for (BotManager botManager : botManagers) { | |
| 239 |
1
1. endGame : removed call to com/takenoko/engine/BotManager::reset → TIMED_OUT |
botManager.reset(); |
| 240 | } | |
| 241 | gameState = GameState.FINISHED; | |
| 242 | } | |
| 243 | ||
| 244 | public String statSummary(int numberOfGames) { | |
| 245 | StringBuilder summary = new StringBuilder(); | |
| 246 | String lineJump = "\n \t \t \t"; | |
| 247 | summary.append("Summarized game statistics for ") | |
| 248 | .append(numberOfGames) | |
| 249 | .append(" games between ") | |
| 250 | .append(botManagers) | |
| 251 | .append(lineJump); | |
| 252 | summary.append("============== BotAverage ==============").append(lineJump); | |
| 253 | for (BotManager botManager : botManagers) { | |
| 254 | summary.append("< ") | |
| 255 | .append(botManager.getName()) | |
| 256 | .append(" : Score avg per game- ") | |
| 257 |
1
1. statSummary : Replaced integer division with multiplication → TIMED_OUT |
.append(scoreboard.getTotalScore().get(botManager) / numberOfGames) |
| 258 | .append(" > | ") | |
| 259 | .append(lineJump); | |
| 260 | } | |
| 261 |
1
1. statSummary : replaced return value with "" for com/takenoko/engine/GameEngine::statSummary → TIMED_OUT |
return summary.toString(); |
| 262 | } | |
| 263 | ||
| 264 | /** | |
| 265 | * Return the winner of the game. | |
| 266 | * | |
| 267 | * <p>If there is a tie, the reason of the end of the game is {@link EndGameState#TIE}. if there | |
| 268 | * is only one {@link BotManager} with the maximum number of points, the reason of the win is | |
| 269 | * {@link EndGameState#WIN_WITH_OBJECTIVE_POINTS}. if there is a tie between {@link BotManager} | |
| 270 | * with the maximum number of points and if there is a {@link BotManager} with the maximum | |
| 271 | * number of panda points, the reason of the win is {@link | |
| 272 | * EndGameState#WIN_WITH_PANDA_OBJECTIVE_POINTS}. | |
| 273 | * | |
| 274 | * @return a pair of the winner and the reason of the win. | |
| 275 | */ | |
| 276 | public Pair<List<BotManager>, EndGameState> getWinner() { | |
| 277 | List<BotManager> botManagersWithMaxScore = | |
| 278 | botManagers.stream() | |
| 279 | .filter( | |
| 280 | botManager -> | |
| 281 |
1
1. lambda$getWinner$0 : replaced boolean return with true for com/takenoko/engine/GameEngine::lambda$getWinner$0 → KILLED |
botManager.getObjectiveScore() |
| 282 | == botManagers.stream() | |
| 283 | .mapToInt(BotManager::getObjectiveScore) | |
| 284 | .max() | |
| 285 |
1
1. lambda$getWinner$0 : negated conditional → KILLED |
.orElse(0)) |
| 286 | .toList(); | |
| 287 |
1
1. getWinner : negated conditional → KILLED |
if (botManagersWithMaxScore.size() == 1) { |
| 288 |
1
1. getWinner : replaced return value with null for com/takenoko/engine/GameEngine::getWinner → KILLED |
return Pair.of( |
| 289 | List.of(botManagersWithMaxScore.get(0)), | |
| 290 | EndGameState.WIN_WITH_OBJECTIVE_POINTS); | |
| 291 | } else { | |
| 292 | List<BotManager> botManagersWithMaxPandaObjective = | |
| 293 | botManagersWithMaxScore.stream() | |
| 294 | .filter( | |
| 295 | botManager -> | |
| 296 |
1
1. lambda$getWinner$1 : replaced boolean return with true for com/takenoko/engine/GameEngine::lambda$getWinner$1 → KILLED |
botManager.getPandaObjectiveScore() |
| 297 | == botManagersWithMaxScore.stream() | |
| 298 | .mapToInt( | |
| 299 | BotManager | |
| 300 | ::getPandaObjectiveScore) | |
| 301 | .max() | |
| 302 |
1
1. lambda$getWinner$1 : negated conditional → KILLED |
.orElse(0)) |
| 303 | .toList(); | |
| 304 |
1
1. getWinner : negated conditional → KILLED |
if (botManagersWithMaxPandaObjective.size() == 1) { |
| 305 |
1
1. getWinner : replaced return value with null for com/takenoko/engine/GameEngine::getWinner → KILLED |
return Pair.of( |
| 306 | List.of(botManagersWithMaxPandaObjective.get(0)), | |
| 307 | EndGameState.WIN_WITH_PANDA_OBJECTIVE_POINTS); | |
| 308 | } | |
| 309 | } | |
| 310 |
1
1. getWinner : replaced return value with null for com/takenoko/engine/GameEngine::getWinner → KILLED |
return Pair.of(botManagersWithMaxScore, EndGameState.TIE); |
| 311 | } | |
| 312 | ||
| 313 | /** | |
| 314 | * Returns the game board | |
| 315 | * | |
| 316 | * @return board object | |
| 317 | */ | |
| 318 | public Board getBoard() { | |
| 319 |
1
1. getBoard : replaced return value with null for com/takenoko/engine/GameEngine::getBoard → KILLED |
return board; |
| 320 | } | |
| 321 | ||
| 322 | /** | |
| 323 | * Return the current game state | |
| 324 | * | |
| 325 | * @return {@link GameState} object | |
| 326 | */ | |
| 327 | public GameState getGameState() { | |
| 328 |
1
1. getGameState : replaced return value with null for com/takenoko/engine/GameEngine::getGameState → KILLED |
return gameState; |
| 329 | } | |
| 330 | ||
| 331 | /** | |
| 332 | * @param gameState the game state to set | |
| 333 | */ | |
| 334 | public void setGameState(GameState gameState) { | |
| 335 | this.gameState = gameState; | |
| 336 | } | |
| 337 | ||
| 338 | /** Run a whole game from initialization to end. */ | |
| 339 | public void runGame() { | |
| 340 |
1
1. runGame : removed call to com/takenoko/engine/GameEngine::newGame → KILLED |
newGame(); |
| 341 |
1
1. runGame : removed call to com/takenoko/engine/GameEngine::startGame → KILLED |
startGame(); |
| 342 |
1
1. runGame : removed call to com/takenoko/engine/GameEngine::playGame → KILLED |
playGame(); |
| 343 |
1
1. runGame : removed call to com/takenoko/engine/GameEngine::endGame → KILLED |
endGame(); |
| 344 | } | |
| 345 | ||
| 346 | public void runGame(int numberOfGames) { | |
| 347 |
2
1. runGame : changed conditional boundary → KILLED 2. runGame : negated conditional → KILLED |
for (int i = 0; i < numberOfGames; i++) { |
| 348 |
1
1. runGame : removed call to com/takenoko/engine/GameEngine::runGame → KILLED |
runGame(); |
| 349 | } | |
| 350 |
1
1. runGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayEnd → KILLED |
consoleUserInterface.displayEnd("All " + numberOfGames + " games have been run :"); |
| 351 |
1
1. runGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayScoreBoard → KILLED |
consoleUserInterface.displayScoreBoard(scoreboard.toString()); |
| 352 |
1
1. runGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayStats → KILLED |
consoleUserInterface.displayStats(statSummary(numberOfGames)); |
| 353 | } | |
| 354 | ||
| 355 | public void runGame(int numberOfGames, boolean logToCSV) { | |
| 356 |
2
1. runGame : changed conditional boundary → NO_COVERAGE 2. runGame : negated conditional → NO_COVERAGE |
for (int i = 0; i < numberOfGames; i++) { |
| 357 |
1
1. runGame : removed call to com/takenoko/engine/GameEngine::runGame → NO_COVERAGE |
runGame(); |
| 358 | } | |
| 359 |
1
1. runGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayEnd → NO_COVERAGE |
consoleUserInterface.displayEnd("All " + numberOfGames + " games have been run :"); |
| 360 |
1
1. runGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayScoreBoard → NO_COVERAGE |
consoleUserInterface.displayScoreBoard(scoreboard.toString()); |
| 361 |
1
1. runGame : removed call to com/takenoko/ui/ConsoleUserInterface::displayStats → NO_COVERAGE |
consoleUserInterface.displayStats(statSummary(numberOfGames)); |
| 362 |
1
1. runGame : negated conditional → NO_COVERAGE |
if (logToCSV) { |
| 363 | BotCSVExporter csvExporter = new BotCSVExporter("stats/gamestats.csv"); | |
| 364 |
1
1. runGame : removed call to com/takenoko/stats/BotCSVExporter::addStatistics → NO_COVERAGE |
csvExporter.addStatistics(botStatistics); |
| 365 |
1
1. runGame : removed call to com/takenoko/stats/BotCSVExporter::writeCSV → NO_COVERAGE |
csvExporter.writeCSV(); |
| 366 | } | |
| 367 | } | |
| 368 | } | |
Mutations | ||
| 48 |
1.1 |
|
| 49 |
1.1 |
|
| 103 |
1.1 |
|
| 105 |
1.1 2.2 |
|
| 110 |
1.1 |
|
| 114 |
1.1 |
|
| 117 |
1.1 |
|
| 118 |
1.1 |
|
| 119 |
1.1 |
|
| 124 |
1.1 |
|
| 130 |
1.1 |
|
| 134 |
1.1 |
|
| 140 |
1.1 |
|
| 147 |
1.1 2.2 |
|
| 148 |
1.1 |
|
| 149 |
1.1 |
|
| 152 |
1.1 2.2 |
|
| 154 |
1.1 |
|
| 157 |
1.1 |
|
| 159 |
1.1 |
|
| 160 |
1.1 |
|
| 163 |
1.1 2.2 3.3 |
|
| 165 |
1.1 |
|
| 168 |
1.1 |
|
| 170 |
1.1 |
|
| 171 |
1.1 |
|
| 172 |
1.1 |
|
| 175 |
1.1 |
|
| 179 |
1.1 |
|
| 185 |
1.1 2.2 |
|
| 192 |
1.1 |
|
| 202 |
1.1 |
|
| 207 |
1.1 |
|
| 221 |
1.1 |
|
| 222 |
1.1 |
|
| 225 |
1.1 |
|
| 226 |
1.1 |
|
| 230 |
1.1 |
|
| 231 |
1.1 |
|
| 233 |
1.1 |
|
| 234 |
1.1 |
|
| 235 |
1.1 |
|
| 236 |
1.1 |
|
| 237 |
1.1 |
|
| 239 |
1.1 |
|
| 257 |
1.1 |
|
| 261 |
1.1 |
|
| 281 |
1.1 |
|
| 285 |
1.1 |
|
| 287 |
1.1 |
|
| 288 |
1.1 |
|
| 296 |
1.1 |
|
| 302 |
1.1 |
|
| 304 |
1.1 |
|
| 305 |
1.1 |
|
| 310 |
1.1 |
|
| 319 |
1.1 |
|
| 328 |
1.1 |
|
| 340 |
1.1 |
|
| 341 |
1.1 |
|
| 342 |
1.1 |
|
| 343 |
1.1 |
|
| 347 |
1.1 2.2 |
|
| 348 |
1.1 |
|
| 350 |
1.1 |
|
| 351 |
1.1 |
|
| 352 |
1.1 |
|
| 356 |
1.1 2.2 |
|
| 357 |
1.1 |
|
| 359 |
1.1 |
|
| 360 |
1.1 |
|
| 361 |
1.1 |
|
| 362 |
1.1 |
|
| 364 |
1.1 |
|
| 365 |
1.1 |