Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Snakes and Ladders calling boolean method

$
0
0
public static boolean move1()
{
int amount = p1dice1;
if(position1 + amount >= 100){
position1 = 100;
}
return true; //the player has reached the end
}
public static boolean move2()
{
int amount = p2dice1;
if(position2 + amount >= 100){
position2 = 100;
}
return true;
}
}//i did this and im not sure if its right or how to call this method into my loop

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>