Skip to content

Commit 8746067

Browse files
authored
Merge branch 'issue_440' into issue_533
2 parents 5238984 + f09a849 commit 8746067

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/pygambit/game.pxi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# along with this program; if not, write to the Free Software
2020
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2121
#
22+
from collections import deque
2223
import io
2324
import itertools
2425
import pathlib

src/pygambit/strategy.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ class Strategy:
115115
action: c_GameAction = self.strategy.deref().GetAction(resolved_infoset.infoset)
116116
if not action:
117117
return None
118-
return Action.wrap(action)
118+
return Action.wrap(action)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import pygambit as gbt
2+
3+
4+
def test_build_images_of_nodes_in_outcomes():
5+
"""Generate images in outcome of the nodes of a simple centipede game with 4 terminal nodes
6+
"""
7+
g = gbt.read_efg("tests/test_games/e02.efg")
8+
z1, z2, z3, z4 = g.outcomes
9+
expected_images = {
10+
g.root: {z1, z2, z3, z4},
11+
g.root.children[0]: {z1},
12+
g.root.children[1]: {z2, z3, z4},
13+
g.root.children[1].children[0]: {z2},
14+
g.root.children[1].children[1]: {z3, z4},
15+
g.root.children[1].children[1].children[0]: {z3},
16+
g.root.children[1].children[1].children[1]: {z4}
17+
}
18+
assert expected_images == g.compute_images()

0 commit comments

Comments
 (0)