Files
Zork/src/com/bayviewglen/zork/Entities/Riddle.java
jslightham d941264ec1 comments
2019-06-01 02:05:37 -04:00

31 lines
630 B
Java

package com.bayviewglen.zork.Entities;
public class Riddle {
/*
* A simple riddle object that stores a question, and the answer to that question that is used in the riddler class.
*/
private String question;
private String answer;
public Riddle() {
this.question = "Why did the chicken cross the road?";
this.answer = "I'm not going through this again.";
}
public Riddle(String question, String answer) {
this.question = question;
this.answer = answer;
}
public String getQuestion() {
return question;
}
public String getAnswer() {
return answer;
}
}