CheaperSlopesModel.kt

1
package com.adventofcode.day03
2
3
class CheaperSlopesModel(private var moveRightBy: Int, private var moveDownBy: Int) : SlopesModel {
4
5
    constructor() : this(3,1)
6
7
    override fun moveOn(gridWithTrees: Grid): Triple<Int, Int, Char> {
8 1 1. moveOn : removed call to com/adventofcode/day03/Grid::moveRightBy → KILLED
        gridWithTrees.moveRightBy(moveRightBy)
9 1 1. moveOn : removed call to com/adventofcode/day03/Grid::moveDownBy → TIMED_OUT
        gridWithTrees.moveDownBy(moveDownBy)
10
        return gridWithTrees.getPosition()
11
12
    }
13
14
    override fun toString(): String {
15 1 1. toString : replaced return value with "" for com/adventofcode/day03/CheaperSlopesModel::toString → NO_COVERAGE
        return "CheaperSlopesModel(moveRightBy=$moveRightBy, moveDownBy=$moveDownBy)"
16
    }
17
18
19
}

Mutations

8

1.1
Location : moveOn
Killed by : com.adventofcode.day03.TobogganTrajectoryTest.[engine:junit-jupiter]/[class:com.adventofcode.day03.TobogganTrajectoryTest]/[method:indicatesNumberOfTreeEncounteredWithMoreThan2linesGridAndCheaperSlopesModel()]
removed call to com/adventofcode/day03/Grid::moveRightBy → KILLED

9

1.1
Location : moveOn
Killed by : none
removed call to com/adventofcode/day03/Grid::moveDownBy → TIMED_OUT

15

1.1
Location : toString
Killed by : none
replaced return value with "" for com/adventofcode/day03/CheaperSlopesModel::toString → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.6.1