PHP ver gevorderde |
|
$aLand = array(
array(0,0,0,0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0,0,0,1),
array(0,0,0,0,0,0,0,0,0,1,0),
array(0,0,0,0,0,0,0,0,0,1,1),
array(0,0,0,0,0,0,0,0,1,0,0),
array(0,0,0,0,0,0,0,0,1,0,1),
array(0,0,0,0,0,0,0,0,1,1,0),
array(0,0,0,0,0,0,0,0,1,1,1),
array(0,0,0,0,0,0,0,1,0,0,0),
array(0,0,0,0,0,0,0,1,0,0,1)
)
// 0 = land
// 1 = water
array(0,0,0,0,0,0,0,0,0,0,0), array(0,0,0,0,0,0,0,0,0,0,1), array(0,0,0,0,0,0,0,0,0,1,0), array(0,0,0,0,0,0,0,0,0,1,1), array(0,0,0,0,0,0,0,0,1,0,0), array(0,0,0,0,0,0,0,0,1,0,1), array(0,0,0,0,0,0,0,0,1,1,0), array(0,0,0,0,0,0,0,0,1,1,1), array(0,0,0,0,0,0,0,1,0,0,0), array(0,0,0,0,0,0,0,1,0,0,1) ) // 0 = land // 1 = water
En die handel uitlezen met dubbele loop (foreach dacht ik dan aan) |