|
13 | 13 | @test isa(result, Array{GameResult,1}) |
14 | 14 | @test length(result) == 2 |
15 | 15 |
|
16 | | - @test isapprox(result[1].value, 0.6666666666666661, atol = tol) |
| 16 | + @test isapprox(result[1].value, 0.6666666666666661, atol=tol) |
17 | 17 |
|
18 | 18 | @test isapprox( |
19 | 19 | result[1].probabilities, |
20 | 20 | [0.4666667, 0.5333333, 0.0000000], |
21 | | - atol = tol, |
| 21 | + atol=tol, |
22 | 22 | ) |
23 | 23 | end |
24 | 24 |
|
|
39 | 39 |
|
40 | 40 | @test result[1].value == 0.0 |
41 | 41 |
|
42 | | - @test isapprox(result[1].probabilities, [0.333333, 0.333333, 0.33333], atol = tol) |
| 42 | + @test isapprox(result[1].probabilities, [0.333333, 0.333333, 0.33333], atol=tol) |
43 | 43 |
|
44 | 44 | @test result[2].value == 0.0 |
45 | 45 |
|
46 | | - @test isapprox(result[2].probabilities, [0.333333, 0.333333, 0.33333], atol = tol) |
| 46 | + @test isapprox(result[2].probabilities, [0.333333, 0.333333, 0.33333], atol=tol) |
47 | 47 |
|
48 | 48 | end |
| 49 | + |
| 50 | + @testset "Simple Game" begin |
| 51 | + |
| 52 | + mat = [ |
| 53 | + 3 7; |
| 54 | + 5 4 |
| 55 | + ] |
| 56 | + |
| 57 | + result = game(mat) |
| 58 | + |
| 59 | + @test isa(result, Array{GameResult,1}) |
| 60 | + |
| 61 | + @test length(result) == 2 |
| 62 | + |
| 63 | + @test result[1].value == 4.6 |
| 64 | + |
| 65 | + @test result[2].value == -4.6 |
| 66 | + |
| 67 | + @test isapprox(result[1].probabilities, [0.2, 0.8], atol=0.00001) |
| 68 | + |
| 69 | + @test isapprox(result[2].probabilities, [0.6, 0.4], atol=0.00001) |
| 70 | + end |
49 | 71 | end |
0 commit comments