forked from jkimrusd/PokemonBattle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttack.java
More file actions
38 lines (33 loc) · 695 Bytes
/
Attack.java
File metadata and controls
38 lines (33 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Pokemon attack. Contains attack min, max, type
*
* @author (Mr. Kim)
* @version (10-04-2018)
*/
public class Attack
{
// instance variables
// Min and Max attack strength
private int min;
private int max;
// Attack Type here
/**
* Constructor for objects of class Attack
*/
public Attack()
{
}
/**
* Calculate attack Strength
*
* @param a sample parameter for a method
* @return the sum of x and y
*/
public int calcAttackStrength()
{
// put your code here
int range = max-min+1;
int strength = (int)(range*Math.random())+min;
return strength;
}
}