This commit is contained in:
Tim
2021-02-22 09:37:34 +10:30
parent 809798e54e
commit 87625f0e8e
10 changed files with 109 additions and 111 deletions

View File

@@ -4,7 +4,8 @@
*/
public class Player {
private String name;
private final String name;
private int score;
Player(String name) {

View File

@@ -10,9 +10,7 @@ public class Shot {
// Array of doubles are passed for a specific type of shot
Shot(double[] shots) {
chances = new double[shots.length];
for(int i=0; i<shots.length; i++) {
chances[i] = shots[i];
}
System.arraycopy(shots, 0, chances, 0, shots.length);
}
public double getShot(int index) {