mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-28 21:54:17 -08:00
Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment. This change fixes that.
This commit is contained in:
19
18_Bullseye/java/src/Shot.java
Normal file
19
18_Bullseye/java/src/Shot.java
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* This class records the percentage chance of a given type of shot
|
||||
* scoring specific points
|
||||
* see Bullseye class points calculation method where its used
|
||||
*/
|
||||
public class Shot {
|
||||
|
||||
double[] chances;
|
||||
|
||||
// Array of doubles are passed for a specific type of shot
|
||||
Shot(double[] shots) {
|
||||
chances = new double[shots.length];
|
||||
System.arraycopy(shots, 0, chances, 0, shots.length);
|
||||
}
|
||||
|
||||
public double getShot(int index) {
|
||||
return chances[index];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user