My int dice
in MovePath()
method needs to get the value of int step
in GetRollDice()
method.
I'm using Java.
How should I do that?
public static int getRollDice(){
int[] diceStep= {-2,-1,1,2,3};
int randomStep = new Random().nextInt(diceStep.length);
int step = diceStep[randomStep];
return step;
}
public static int MovePath(Integer dice,Integer path){
// int dice = step value from GetRollDice
//Get Initial Path
//Next path = roll dice value + initial path
return path;
}