-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
30 lines (26 loc) · 722 Bytes
/
Copy pathProgram.cs
File metadata and controls
30 lines (26 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GameOfLife
{
class Program
{
static void Main(string[] args)
{
var life = new HashSet<Tuple<int, int>> {
new Tuple<int, int> ( 1, 2 ),
new Tuple<int, int> ( 2, 3 ),
new Tuple<int, int> ( 3, 1 ),
new Tuple<int, int> ( 3, 2 ),
new Tuple<int, int> ( 3, 3 )
};
Console.WriteLine(life.Draw());
while (Console.ReadLine() == "y")
{
life = life.Evolve();
Console.WriteLine(life.Draw());
}
}
}
}