-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMatchSimulatorFacts.cs
30 lines (26 loc) · 1008 Bytes
/
MatchSimulatorFacts.cs
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
namespace Grove.Tests
{
using System;
using AI;
using Infrastructure;
using Xunit;
public class MatchSimulatorFacts : Scenario
{
//[Fact]
public void Simulate()
{
var deck1 = GetDeck("deck1.dec");
var deck2 = GetDeck("deck2.dec");
var result = MatchSimulator.Simulate(deck1, deck2,
maxTurnsPerGame: 25, maxSearchDepth: 12, maxTargetsCount: 2);
Console.WriteLine(@"{0} vs {1}", deck1, deck2);
Console.WriteLine(@"{0} win count: {1}.", deck1, result.Deck1WinCount);
Console.WriteLine(@"{0} win count: {1}.", deck2, result.Deck2WinCount);
Console.WriteLine(@"Match duration: {0}.", result.Duration);
Console.WriteLine(@"Turn count: {0}.", result.TotalTurnCount);
Console.WriteLine(@"Total search count: {0}.", result.TotalSearchCount);
Console.WriteLine(@"Max search time: {0}.", result.MaxSearchTime);
Assert.True(result.Deck1WinCount + result.Deck2WinCount >= 2);
}
}
}