-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback #1
base: feedback
Are you sure you want to change the base?
Feedback #1
Changes from all commits
0bade8a
55534d2
947adfe
31ab2a4
9f95ac8
e80ae0f
2ad30ee
a03a955
4e18322
2a970ac
2b562d1
0e5cf44
53c7483
4da83b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> | ||
<output url="file://$MODULE_DIR$/target/classes" /> | ||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:jakarta.inject:2.6.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http-server:2.4.4" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http:2.4.4" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-framework:2.4.4" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.3" level="project" /> | ||
<orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" /> | ||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" /> | ||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" /> | ||
<orderEntry type="library" name="Maven: jakarta.ws.rs:jakarta.ws.rs-api:2.1.6" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.inject:jersey-hk2:2.26" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.5.0-b42" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:javax.inject:2.5.0-b42" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b42" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.5.0-b42" level="project" /> | ||
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.5.0-b42" level="project" /> | ||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.2" level="project" /> | ||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.22.0-CR2" level="project" /> | ||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.0" level="project" /> | ||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.0" level="project" /> | ||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.0" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.29.1" level="project" /> | ||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.9" level="project" /> | ||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" /> | ||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> | ||
<orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.32.3.2" level="project" /> | ||
</component> | ||
</module> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package student; | ||
|
||
import org.glassfish.grizzly.http.server.HttpServer; | ||
import student.adventure.AdventureDesign; | ||
import student.adventure.GameEngine; | ||
import student.server.AdventureResource; | ||
import student.server.AdventureServer; | ||
import student.server.BreakingBadAdventureService; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Scanner; | ||
|
||
/** | ||
* Main class that uses a scanner input to call methods, and is used as a UI. Commands include "go", "take", | ||
* "drop", "examine", and more. Accounts for spelling and spacing errors. This class also stores the server | ||
* for the API. | ||
*/ | ||
public class Main { | ||
|
||
public static void main(String[] args) throws IOException { | ||
HttpServer server = AdventureServer.createServer(AdventureResource.class); | ||
server.start(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package student.adventure; | ||
|
||
public class AdventureDesign { | ||
|
||
//the full list of rooms in the JSON file | ||
public Room[] rooms; | ||
//the name of the room that one starts in, stored in a String | ||
public String startingRoom; | ||
//the name of the room that one ends in, stored in a String | ||
public String endingRoom; | ||
|
||
public AdventureDesign() { | ||
|
||
} | ||
/** | ||
* getter to retrieve the starting room of the adventure | ||
* @return startingRoom | ||
*/ | ||
public String getStartingRoom() { | ||
return startingRoom; | ||
} | ||
|
||
/** | ||
* getter to retrieve the ending room of the adventure | ||
* @return endingRoom | ||
*/ | ||
public String getEndingRoom() { | ||
return endingRoom; | ||
} | ||
|
||
/** | ||
* getter to retrieve the full list of rooms in JSON, all stored in the Room object | ||
* @return rooms | ||
*/ | ||
public Room[] getRooms() { | ||
return rooms; | ||
} | ||
|
||
/** | ||
* Complete constructor for the AdventureDesign class | ||
* @param startingRoom - the starting room of the adventure | ||
* @param endingRoom - the ending room of the adventure | ||
* @param rooms - the full array of the rooms available | ||
*/ | ||
public AdventureDesign(String startingRoom, String endingRoom, Room[] rooms) { | ||
this.startingRoom = startingRoom; | ||
this.endingRoom = endingRoom; | ||
this.rooms = rooms; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package student.adventure; | ||
|
||
/** | ||
* This class works much like a linked list, where the Direction acts as a key, and the next room is viewed | ||
* as a value | ||
*/ | ||
public class DirectionsOnMap { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just call this class Directions? DirectionsOnMap feels a bit redundant. |
||
//the direction one is going in | ||
private String directionName; | ||
//the next room one will go in following the currentDirection | ||
private String room; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd advise you to call this member variable |
||
|
||
public DirectionsOnMap() { | ||
|
||
} | ||
/** | ||
* getter to retrieve the name of the direction | ||
* @return directionName | ||
*/ | ||
public String getDirectionName() { | ||
return directionName; | ||
} | ||
|
||
/** | ||
* getter to retrieve the name of the room that will be reached following a said direction | ||
* @return room | ||
*/ | ||
public String getRoom() { | ||
return room; | ||
} | ||
|
||
/** | ||
* Full constructor for the DirectionsOnMap class | ||
* @param directionName - name of the direction(north, east, south, west, etc.) | ||
* @param roomName - name of the room in said direction | ||
*/ | ||
public DirectionsOnMap(String directionName, String roomName) { | ||
this.directionName = directionName; | ||
this.room = roomName; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your main has way too much in it right now. All of your game logic should be in its own class. At the moment its impossible to test your game engine, which is a big issue as we always want to make our code as easy to test as possible.