-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
43 lines (37 loc) · 1.15 KB
/
Copy pathProgram.cs
File metadata and controls
43 lines (37 loc) · 1.15 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
using System;
using System.Diagnostics;
class Program
{
static void Main()
{
var testEtme = new (int m, int n)[]
{
// ve n kendimkoydum deneme için
(5, 2), //1.degerler
(3, 3), //2d egerler
(2, 4) ,//3.degerler
};
foreach (var (m, n) in testEtme)
{
Console.WriteLine($"\nOYUN Başlıyor: m = {m}, n = {n}");
var manager = new BalonManagar(m);
manager.StartGame(n);
}
Console.WriteLine("\n PERFORMANS TESTİ ");
BilgisayarPerformans();
}
static void BilgisayarPerformans()
{
int testsayisi = 0;
var zaman = new Stopwatch();
zaman.Start();
while (zaman.Elapsed.TotalSeconds < 1) // 1 saniye boyunca çalıştırIR
{
var manager = new BalonManagar(5); // Rastgele bir m değeri (örneğin 5)
manager.StartGame(2, silent: true); // Sessiz modda çalıştır
testsayisi++;
}
zaman.Stop();
Console.WriteLine($"\nBilgisayarr 1 saniyede {testsayisi} balon problemi çözebilior.");
}
}