package com.adaptionsoft.games.trivia.runner;

import com.adaptionsoft.games.uglytrivia.Game;
import com.adaptionsoft.games.uglytrivia.Players;
import com.adaptionsoft.games.uglytrivia.Questions;

import java.util.Random;

public class GameRunner {

    private static boolean notAWinner; // TODO IDEA says can be converted to local variable

    public static void main(String[] args) {
        Random rand = new Random();
        play(rand);
    }

    public static void play(Random rand) {
        
        Players players = new Players();
        players.add("Chet");
        players.add("Pat");
        players.add("Sue");

        Questions questions = new Questions();

        Game aGame = new Game(players, questions);

        do {

            aGame.play(rand.nextInt(5) + 1);

            if (rand.nextInt(9) == 7) {
                notAWinner = aGame.wrongAnswer();
            } else {
                notAWinner = aGame.correctAnswer();
            }

        } while (notAWinner);
        
    }
}

@@ -257,103 +257,8 @@
 %0D%0A%0D%0A
-    private static boolean notAWinner; // TODO IDEA says can be converted to local variable%0D%0A%0D%0A
     
@@ -652,24 +652,53 @@
 stions);%0D%0A%0D%0A
+        boolean notAWinner;%0D%0A
         do %7B

make field local variable as suggested by IDEA. Thank you IDEA.