YEHAA!

332!

 Code:
Function S($o)
  Dim $i, $, $k, $t, $x, $v, $p,$r
  
  For $x = 0 to 16
    If instr(join($),x) | $x=0
    ReDim $s[3, 3, $x],	$[11]
    
    For $r = 0 to 7
      For $i = 0 to 3
        $v = $o[$r mod 4, $i]
        $k = 11-2*($r mod 4 <2)-($i<2)
        If $r < 4
          $[$i] = $[$i] + $v
          $[4+$r] = $[4+$r] + $v
          $[$k] = $[$k] + $v
          $s[$r, $i, $x] = $v
        Else
            $p = @
            For $t = 1 to 4
              If 0 = InStr($[$r]+$[$i]+$[$k],$t) + $v
                $p = $p + $t
              EndIf
            Next
    
            If 1=($p^)
              $o[$r-4,$i] = $p
              $r = 7
              $i = 3
EndFunction


that move of the x-check doesn't benefit. I just hated seeing that darn exit command in there \:\)
_________________________
!

download KiXnet