sheep have 50% chance to jump every 2 state changes

This commit is contained in:
Charlie Wang 2013-07-12 09:28:50 -04:00
parent 6166c56f9c
commit 968603d54f

View File

@ -180,10 +180,8 @@ public class DiscoParty {
}
if (doJump) {
if (state % 4 == 0) {
if ((state % 8 == 0) && (i % 2 == 0)) {
jumpSheep(sheep);
} else if (i % 2 != 0) {
if (state % 2 == 0) {
if (Math.random() < 0.5) {
jumpSheep(sheep);
}
}