+ static void assertWinLose(String winner, String loser) {
+ assertLeftWin(runGame(winner, loser));
+ assertRightWin(runGame(loser, winner));
+ }
+
+ static void assertLeftWin(GameResult gameResult) {
+ int[] scores = assertTwoScores(gameResult);
+ if (scores == null) return;
+
+ int s1 = scores[0], s2 = scores[1];
+ assertTrue("Left player has higher score than right player", s1 > s2);
+ }
+
+ static void assertRightWin(GameResult gameResult) {
+ int[] scores = assertTwoScores(gameResult);
+ if (scores == null) return;
+
+ int s1 = scores[0], s2 = scores[1];
+ assertTrue("Right player has higher score than right player", s2 > s1);
+ }
+