Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Game_Life
- {
- class Cell
- {
- bool isAlive;
- byte ColorOfCell;
- public Cell()
- {
- isAlive = false;
- ColorOfCell = 0;
- }
- }
- public class Matrix
- {
- Cell[,] matrix;
- public Matrix(int X, int Y)
- {
- matrix = new Cell[X, Y];
- }
- public void MatrixInit()
- {
- Random rnd = new Random();
- for (int i = 0; i < matrix.Length; i++)
- {
- for (int j = 0; j < matrix.Length; j++)
- {
- matrix[i, j] = false;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement