Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,24 @@ class Test {
const int ITE = 300;
const int regle = 62;
static void Main (string [] args) {
int [] grille = new int [TAILLE];
Bool [] grille = new Bool [TAILLE];
// why not use a bool array instead as values are 0 / 1
int [] temp = new int [TAILLE];

Random r = new Random();
for (int i = 0 ; i < TAILLE ; i++) {
if (r.NextDouble() > 0.5)
grille [i] = 1;
grille [i] = True;
else
grille [i] = 0;
grille [i] = False;
}
//grille[150] = 1;
afficherGrille(grille);
for (int i = 0 ; i < ITE ; i++) {
for (int j = 0 ; j < TAILLE ; j++) {
temp [j] = calculEtatCellule(j,grille);
}
grille = new int [TAILLE];
grille = new Bool[TAILLE];
grille = temp;
afficherGrille(grille);
temp = new int [TAILLE];
Expand Down