| 1 | package com.takenoko.vector; | |
| 2 | ||
| 3 | public class PositionVector extends Vector { | |
| 4 | /** | |
| 5 | * Constructor for the Vector class. The vector is represented by its coordinates in a 2D | |
| 6 | * hexagonal grid. The vector must respect q+r+s=0. | |
| 7 | * | |
| 8 | * @param q The q coordinate of the vector. | |
| 9 | * @param r The r coordinate of the vector. | |
| 10 | * @param s The s coordinate of the vector. | |
| 11 | */ | |
| 12 | public PositionVector(int q, int r, int s) { | |
| 13 | super(q, r, s); | |
| 14 | } | |
| 15 | ||
| 16 | public PositionVector(Vector vector) { | |
| 17 | super(vector.q(), vector.r(), vector.s()); | |
| 18 | } | |
| 19 | ||
| 20 | public PositionVector copy() { | |
| 21 |
1
1. copy : replaced return value with null for com/takenoko/vector/PositionVector::copy → KILLED |
return new PositionVector(this); |
| 22 | } | |
| 23 | } | |
Mutations | ||
| 21 |
1.1 |