File tree Expand file tree Collapse file tree 6 files changed +11
-7
lines changed
src/main/java/com/hangman Expand file tree Collapse file tree 6 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ apply plugin: 'application'
3
3
apply plugin : ' maven'
4
4
5
5
mainClassName = ' com.hangman.HangmanRunner'
6
+ group = ' Hangman'
7
+ version = ' 1'
8
+
9
+ description = """ """
6
10
7
11
repositories {
8
12
mavenCentral()
Original file line number Diff line number Diff line change 1
1
package com .hangman ;
2
2
3
- interface AnswerGenerator {
3
+ public interface AnswerGenerator {
4
4
String generateAnswer ();
5
5
}
Original file line number Diff line number Diff line change 1
1
package com .hangman ;
2
2
3
- interface GameOverDisplay {
3
+ public interface GameOverDisplay {
4
4
void gameOver ();
5
5
}
Original file line number Diff line number Diff line change 4
4
import java .util .List ;
5
5
import java .util .Observable ;
6
6
7
- class HangmanGame extends Observable implements Game {
7
+ public class HangmanGame extends Observable implements Game {
8
8
static int MaxIncorrectGuesses = 9 ;
9
9
private int incorrectGuesses ;
10
10
private List <Character > answer ;
11
11
private List <Character > correctGuesses ;
12
12
private AnswerGenerator answerGenerator = new RandomAnswerGeneratorFromList ();
13
13
14
- HangmanGame ()
14
+ public HangmanGame ()
15
15
{
16
16
correctGuesses = new ArrayList <>();
17
17
incorrectGuesses = 0 ;
@@ -62,7 +62,7 @@ public int numGuesses() {
62
62
return incorrectGuesses + correctGuesses .size ();
63
63
}
64
64
65
- void setAnswerGenerator (AnswerGenerator answerGenerator ) {
65
+ public void setAnswerGenerator (AnswerGenerator answerGenerator ) {
66
66
this .answerGenerator = answerGenerator ;
67
67
}
68
68
Original file line number Diff line number Diff line change 1
1
package com .hangman ;
2
2
3
- interface Runner {
3
+ public interface Runner {
4
4
void run ();
5
5
boolean isWinner ();
6
6
int numGuesses ();
Original file line number Diff line number Diff line change 1
1
package com .hangman ;
2
2
3
- interface Ticker {
3
+ public interface Ticker {
4
4
void tick ();
5
5
}
You can’t perform that action at this time.
0 commit comments