mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-29 06:05:36 -08:00
cleanup
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
*/
|
||||
public class Player {
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
private int score;
|
||||
|
||||
Player(String name) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user