2013-10-26 47 views

回答

1

下面是做這件事:

to setup 
    clear-all 
    ; paint the world's border: 
    ask patches with [ 
    pxcor = min-pxcor or 
    pxcor = max-pxcor or 
    pycor = min-pycor or 
    pycor = max-pycor 
    ] 
    [ 
    set pcolor violet 
    ] 
    ; paint 15 not-yet-painted patches: 
    ask n-of 15 patches with [ pcolor != violet ] [ 
    set pcolor violet 
    ] 
end 
+0

我來試試...... thanxs – user2923389

+0

它完美的作品... – user2923389

相關問題