this is in reply to my other post but i was wondering what would the code be in this scenario. the object moves certain x and y coordinates. when it moves one time it checks to see if its at a certain x and y and if it's not there it keeps moving on how many times the dice tells it to. when it hits that certain x and y it rotates 90 degrees and restarts the loop and keeps moving a certain number of x and y coordinates until it hits another edge that has a certain coordinate. So far we have the game programmed so it rolls two dice, and we have code so that greenfoot is able to get the value of the two dice which we add together. We want to program the game to get the value of the dice rolled and follow the set circumstances above.