-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
48 lines (42 loc) · 1.29 KB
/
Program.cs
File metadata and controls
48 lines (42 loc) · 1.29 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using SFML.Graphics;
using SFML.System;
using SFML.Window;
using static population.Common;
namespace population
{
class Program
{
static void Main(string[] args)
{
window = new RenderWindow(VideoMode.DesktopMode, "Population 1.0");
window.Size = new Vector2u(1600, 900);
window.Closed += Win_Close;
grid = new Grid(180, 320, 5);
grid.AddCell(new Entity(), 1, 1);
/*
grid.AddCell(new Entity(), 151, 150);
grid.AddCell(new Entity(), 152, 150);
grid.AddCell(new Entity(), 110, 150);
grid.AddCell(new Entity(), 121, 150);
grid.AddCell(new Entity(), 132, 150);
grid.AddCell(new Entity(), 140, 150);
grid.AddCell(new Entity(), 51, 150);
grid.AddCell(new Entity(), 2, 150);
*/
while (window.IsOpen)
{
window.DispatchEvents();
grid.SpawnOrganics();
grid.RunCycle();
grid.Draw(0, 0);
window.Display();
window.Clear();
}
}
private static void Win_Close(object sender, EventArgs e)
{
window.Close();
}
}
}