Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace Game_Life
  7. {
  8. class Cell
  9. {
  10. bool isAlive;
  11. byte ColorOfCell;
  12. public Cell()
  13. {
  14. isAlive = false;
  15. ColorOfCell = 0;
  16. }
  17. }
  18. public class Matrix
  19. {
  20. Cell[,] matrix;
  21.  
  22. public Matrix(int X, int Y)
  23. {
  24. matrix = new Cell[X, Y];
  25. }
  26. public void MatrixInit()
  27. {
  28. Random rnd = new Random();
  29. for (int i = 0; i < matrix.Length; i++)
  30. {
  31. for (int j = 0; j < matrix.Length; j++)
  32. {
  33. matrix[i, j] = false;
  34. }
  35. }
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement