summaryrefslogtreecommitdiff
path: root/tit4tat.pl
blob: c94c13e17ca77276bec44242c9188aa38971edd9 (plain)
1
2
3
4
5
6
% Syntax: MODULE(UserDecisionHistry [in], ModuleDecision [out])

% Use opponents last decision
tit4tat([Last|_],Last).
% Fallback to coorporate if history is empty.
tit4tat([],c).