Created
January 19, 2015 21:36
-
-
Save anonymous/2a651ce37a403a6202eb to your computer and use it in GitHub Desktop.
Fields - Monster methods, Random method, monster traits (arrays)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class Fields | |
{ | |
Random dice = new Random(); | |
int oneDThree; | |
public void getRand() | |
{ | |
oneDThree = dice.nextInt(3); | |
} | |
public void createCreature(String name, int attack, int defense, | |
String armorName, String weaponName) | |
{ | |
} | |
//creating the array to hold the 3 monsters for the first area | |
String creatureArray[] = {"Rat", "Tiger", "Bandit"}; | |
int attackArray[] = {10,15,20}; | |
int defenseArray[]={8,20,16}; | |
String armorArray[]={"Fur", "Fur", "Chain Mail"}; | |
String weaponArray[]={"Claws", "Claws", "Broad Sword"} ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment