Graphics 640,480,32,1 SetBuffer BackBuffer() Global CHECKS = 0 Dim ARRAY( 8 , 8 ) ;populate For l = 0 To 8 Steps = 9 - l ;top row For s = 0 To Steps - 1 CHECK( l+s, s ) Next ;left column If l > 0 For s = 0 To Steps - 1 CHECK( s , l+s ) Next EndIf Next ;display For y = 0 To 8 For x = 0 To 8 col = ( x + y ) Mod 2 If col = 0 Color 255,0,0 Else Color 0,0,255 EndIf Text x*30,y*30, ARRAY( x, y ) Next Next Flip WaitKey ;================================== ;================================== ;================================== Function CHECK( x, y ) ARRAY( x, y ) = CHECKS CHECKS = CHECKS + 1 End Function
[EDIT] Similar to the above