Skip to content

Commit 0e9f3b9

Browse files
yohmdrvinceknight
authored andcommitted
Update axelrod/strategies/grudger.py
Co-authored-by: Vince Knight <[email protected]>
1 parent d805661 commit 0e9f3b9

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

axelrod/strategies/grudger.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -381,36 +381,36 @@ def strategy(self, opponent: Player) -> Action:
381381

382382
if hist == [[C,C],[C,C],[C,C]]: # Rule: C
383383
return C
384-
elif hist == [[C,C],[C,C],[D,C]]: # Rule: A
384+
if hist == [[C, C], [C, C], [D, C]]: # Rule: A
385385
return C
386-
elif hist == [[C,C],[D,C],[C,D]]:
386+
if hist == [[C, C], [D, C], [C, D]]:
387387
return C
388-
elif hist == [[D,C],[C,D],[C,C]]:
388+
if hist == [[D, C], [C, D], [C, C]]:
389389
return C
390-
elif hist == [[C,D],[C,C],[C,C]]:
390+
if hist == [[C, D], [C, C], [C, C]]:
391391
return C
392-
elif hist == [[C,C],[C,C],[C,D]]: # Rule: P
392+
if hist == [[C, C], [C, C], [C, D]]: # Rule: P
393393
return D
394-
elif hist == [[C,C],[C,D],[D,C]]:
394+
if hist == [[C, C], [C, D], [D, C]]:
395395
return C
396-
elif hist == [[C,D],[D,C],[C,C]]:
396+
if hist == [[C, D], [D, C], [C, C]]:
397397
return C
398-
elif hist == [[D,C],[C,C],[C,C]]:
398+
if hist == [[D, C], [C, C], [C, C]]:
399399
return C
400-
elif hist == [[D,D],[D,D],[D,C]]: # Rule: R1
400+
if hist == [[D, D], [D, D], [D, C]]: # Rule: R1
401401
return C
402-
elif hist == [[D,D],[D,C],[C,C]]:
402+
if hist == [[D, D], [D, C], [C, C]]:
403403
return C
404-
elif hist == [[D,C],[C,C],[C,C]]:
404+
if hist == [[D, C], [C, C], [C, C]]:
405405
return C
406-
elif hist == [[D,D],[D,D],[C,D]]: # Rule: R2
406+
if hist == [[D, D], [D, D], [C, D]]: # Rule: R2
407407
return C
408-
elif hist == [[D,D],[C,D],[C,C]]:
408+
if hist == [[D, D], [C, D], [C, C]]:
409409
return C
410-
elif hist == [[C,D],[C,C],[C,C]]:
410+
if hist == [[C, D], [C, C], [C, C]]:
411411
return C
412-
elif hist == [[D,D],[D,D],[C,C]]: # Rule: R3
412+
if hist == [[D, D], [D, D], [C, C]]: # Rule: R3
413413
return C
414-
elif hist == [[D,D],[C,C],[C,C]]:
414+
if hist == [[D, D], [C, C], [C, C]]:
415415
return C
416416
return D

0 commit comments

Comments
 (0)