Skip to content

Commit 9cdfe90

Browse files
author
Eric Smith
committed
Get Gradle to install jar
- A bunch of the classes and methods need to be public, as the scorer uses them.
1 parent d27a0a7 commit 9cdfe90

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ apply plugin: 'application'
33
apply plugin: 'maven'
44

55
mainClassName = 'com.hangman.HangmanRunner'
6+
group = 'Hangman'
7+
version = '1'
8+
9+
description = """"""
610

711
repositories {
812
mavenCentral()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.hangman;
22

3-
interface AnswerGenerator {
3+
public interface AnswerGenerator {
44
String generateAnswer();
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.hangman;
22

3-
interface GameOverDisplay {
3+
public interface GameOverDisplay {
44
void gameOver();
55
}

src/main/java/com/hangman/HangmanGame.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
import java.util.List;
55
import java.util.Observable;
66

7-
class HangmanGame extends Observable implements Game {
7+
public class HangmanGame extends Observable implements Game {
88
static int MaxIncorrectGuesses = 9;
99
private int incorrectGuesses;
1010
private List<Character> answer;
1111
private List<Character> correctGuesses;
1212
private AnswerGenerator answerGenerator = new RandomAnswerGeneratorFromList();
1313

14-
HangmanGame()
14+
public HangmanGame()
1515
{
1616
correctGuesses = new ArrayList<>();
1717
incorrectGuesses = 0;
@@ -62,7 +62,7 @@ public int numGuesses() {
6262
return incorrectGuesses + correctGuesses.size();
6363
}
6464

65-
void setAnswerGenerator(AnswerGenerator answerGenerator) {
65+
public void setAnswerGenerator(AnswerGenerator answerGenerator) {
6666
this.answerGenerator = answerGenerator;
6767
}
6868

src/main/java/com/hangman/Runner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.hangman;
22

3-
interface Runner {
3+
public interface Runner {
44
void run();
55
boolean isWinner();
66
int numGuesses();

src/main/java/com/hangman/Ticker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.hangman;
22

3-
interface Ticker {
3+
public interface Ticker {
44
void tick();
55
}

0 commit comments

Comments
 (0)