This site requires JavaScript, please enable it in your browser!
Greenfoot back
makconas
makconas wrote ...

2015/10/13

How to set an any integer k in Worldclass

makconas makconas

2015/10/13

#
public int k;
    
     public void initializeBypattermTwo(){
        int width =GWorld.width();
          
        
         for(int i=0;i<=width*width;i++){
             Chess newChess = new Chess();
             if(i/width+i%width==2*k+1 ) 
              continue;
             GWorld.addOneObject(newChess,i/width,i%width);
              
                
            }
        
    
    }
You need to login to post a reply.