From 699de028107480b758a7ede75b275750c99371d7 Mon Sep 17 00:00:00 2001 From: Patrick FELIX-VIMALARATNAM Date: Sat, 29 Nov 2025 19:29:39 +0100 Subject: [PATCH] Update src/main/java/fr/iut_fbleau/info/but3/automation/rock_paper_scissors/play/domain/Move.java add WELL in the game, the WELL loose in front of the PAPER and win against the ROCK and the SCISSORS. --- .../automation/rock_paper_scissors/play/domain/Move.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/iut_fbleau/info/but3/automation/rock_paper_scissors/play/domain/Move.java b/src/main/java/fr/iut_fbleau/info/but3/automation/rock_paper_scissors/play/domain/Move.java index 29eb0fd..f7aa317 100644 --- a/src/main/java/fr/iut_fbleau/info/but3/automation/rock_paper_scissors/play/domain/Move.java +++ b/src/main/java/fr/iut_fbleau/info/but3/automation/rock_paper_scissors/play/domain/Move.java @@ -3,13 +3,15 @@ package fr.iut_fbleau.info.but3.automation.rock_paper_scissors.play.domain; public enum Move { ROCK, PAPER, - SCISSORS; + SCISSORS, + WELL; 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 == ROCK || other == SCISSORS); }; } }