Back to project page project2.
The source code is released under:
MIT License
If you think the Android project project2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package team2.scdm; /*from w w w .j a v a 2 s.c om*/ import java.util.Random; public class Weapon extends Item { public Weapon(int value) { super(value); } /** * This returns the damage the player inflicts when using this weapon. * @return * The damage the user inflicts. */ public int use() { Random rand = new Random(); return (1 + rand.nextInt(value)); } }