aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-11-10 20:00:25 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-11-10 20:00:25 +0100
commit3fdf270456da15447c5a57851610888e2f510574 (patch)
tree927ff1041cd00995e6e5a55850da84b2aab0155e
parent78383da1e33ce2ee7e330cc6ffbcaa20d91c3600 (diff)
downloadCompetIA-3fdf270456da15447c5a57851610888e2f510574.tar.gz
CompetIA-3fdf270456da15447c5a57851610888e2f510574.zip
Add commands A and Z
-rw-r--r--README.md2
-rw-r--r--judge/main.ml2
2 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5e636b5..027941c 100644
--- a/README.md
+++ b/README.md
@@ -108,6 +108,8 @@ Les commandes sont les suivantes :
- p : partie précédente (prev)
- f : coup suivant (forward)
- b : coup précédent (back)
+ - a : début de partie
+ - z : fin de partie
Le morpion récursif
diff --git a/judge/main.ml b/judge/main.ml
index 18cba43..47d29ba 100644
--- a/judge/main.ml
+++ b/judge/main.ml
@@ -75,6 +75,8 @@ end = struct
curr_view := NavGame (g, n+1)
| NavGame (g, n), 'f' when n = List.length (C.hist g) - 1 ->
curr_view := NavGame (g, -1)
+ | NavGame(g, _), 'a' -> curr_view := NavGame(g, 0)
+ | NavGame(g, _), 'z' -> curr_view := NavGame(g, -1)
| ViewLastGame, '\t' | NavGame _, '\t' -> curr_view := MatchList false
| Question(_, y, n), 'y' -> y()
| Question(_, y, n), 'n' -> curr_view := n