aboutsummaryrefslogtreecommitdiff
path: root/testSGF.py
blob: 08a1beed6af737fb23b67e853a7a05783d154ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python

"""Gets a game from an SGF file."""

import sys

from imago.sgfParser.sgf import loadGameTree

def main():
    filename = sys.argv[1]
    move = loadGameTree(filename)
    while move is not None:
        move.printBoard()
        if len(move.nextMoves) > 0:
            move = move.nextMoves[0]
        else:
            move = None

if __name__ == '__main__':
    main()