Ajout de l'outcome feuille bat puit
All checks were successful
rock-paper-scissors/pipeline/head This commit looks good
rock-paper-scissors/pipeline/pr-main This commit looks good

This commit is contained in:
2025-11-27 10:36:53 +01:00
parent 93428c09d7
commit 78cdf7c628
2 changed files with 2 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ public enum Move {
public boolean beats(Move other) {
return switch (this) {
case ROCK -> other == SCISSORS;
case PAPER -> other == ROCK;
case PAPER -> other == ROCK || other == WELL;
case SCISSORS -> other == PAPER;
case WELL -> other == SCISSORS || other == ROCK;
};

View File

@@ -33,6 +33,7 @@ class MoveTest {
return Stream.of(
Arguments.of(Move.ROCK,Move.SCISSORS),
Arguments.of(Move.PAPER,Move.ROCK),
Arguments.of(Move.PAPER,Move.WELL),
Arguments.of(Move.SCISSORS,Move.PAPER),
Arguments.of(Move.WELL,Move.SCISSORS),
Arguments.of(Move.WELL,Move.ROCK)