How do you make the checks through the rows? I set up a variable for the rows (and columns) and made a for loop using it but I don't know how to make the remover move down the rows or how it removes the rows. I don't know what to do...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | public class RowRemover extends Actor { //Variables used NumberWorld world = (NumberWorld) getWorld(); private int rows = 14 ; private int cols = 9 ; protected void addedToWorld(World world) { GreenfootImage img = new GreenfootImage(world.getWidth(), 2 ); setImage(img); } public void go() { for ( int i = 0 ; i < rows; i++) { //Skips rows that contain unsolved numbers if (world.numbers.get(i).getValue() != 0 ) { continue ; } //Whatever else I need here } world.removeObject( this ); } } |