summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pavlov.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/pavlov.pl b/pavlov.pl
index 4ca359f..cc33a73 100644
--- a/pavlov.pl
+++ b/pavlov.pl
@@ -1,5 +1,5 @@
% Cooperates if and only if both players opted for the
% same choice in the previous move, otherwise it defects.
-pavlov([], c, _, c).
+pavlov([], c, _, c):-!.
pavlov([Choice|_], c, Choice, c):-!.
-pavlov([_], d, _, d).
+pavlov(_, d, _, d).