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 |
|
9 |
1.1 |
|
15 |
1.1 |