06-08-2025, 04:04 PM
And a way to massively speed up the visualisation in Game of Life.
Code:
Sub AffichageTableau ' displays current Gen grid (av 550ms with grid 80)
GraphicsWindow.Title = tailletableau + "x" + tailletableau + " Génération = " + n
GraphicsWindow.brushColor = "White"
GraphicsWindow.FillRectangle(0,0,GraphicsWindow.Width,GraphicsWindow.Height)
GraphicsWindow.brushColor = "Green"
For x = 1 To tailletableau
For y = 1 To tailletableau
'If tableau[x][y] = 1 then
If LDFastArray.Get2D(tableau,x,y) = 1 Then
GraphicsWindow.FillRectangle(x*taillecase,y*taillecase,taillecase,taillecase)
EndIf
EndFor
EndFor
EndSub