Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
30f574f
initial push of skeleton code from tillie A8
Tslos Apr 16, 2024
e5260e6
Merge pull request #1 from Tslos/tillie
Tslos Apr 16, 2024
47984fb
Merge pull request #2 from Tslos/main
Tslos Apr 16, 2024
ebaea4d
added a game class
Reed-Shaw Apr 24, 2024
de519a0
update to Game() class, new ideas on how to structure
Tslos Apr 25, 2024
21d05a5
Merge pull request #3 from Tslos/tillie
Tslos Apr 25, 2024
97c31a5
Merge branch 'reed' into main
Tslos Apr 25, 2024
3bfd6dd
Merge pull request #4 from Tslos/main
Tslos Apr 25, 2024
bca854b
Making places
Reed-Shaw Apr 25, 2024
3ac8799
Merge pull request #5 from Tslos/reed
Reed-Shaw Apr 25, 2024
34cdbf8
Merge pull request #6 from Tslos/main
Tslos Apr 25, 2024
1cbaf26
game updates
Tslos Apr 27, 2024
98ccc49
Merge pull request #7 from Tslos/tillie
Tslos Apr 27, 2024
4941cdb
Merge pull request #8 from Tslos/main
Tslos Apr 27, 2024
ace5009
game updates pt 2!
Tslos Apr 27, 2024
f6289b4
Meeting progress
Reed-Shaw Apr 27, 2024
d7274d8
Merge pull request #9 from Tslos/tillie
Tslos Apr 27, 2024
f2c4cd8
Merge branch 'main' into reed
Tslos Apr 27, 2024
d8cab97
Merge pull request #10 from Tslos/reed
Tslos Apr 27, 2024
a0a39d0
Game additions (examine, take, drop, executeAction) plus architecture…
Tslos Apr 29, 2024
aca719d
Merge branch 'main' into tillie
Tslos Apr 29, 2024
418fbb5
Merge pull request #11 from Tslos/tillie
Tslos Apr 29, 2024
370de86
Merge pull request #12 from Tslos/main
Tslos Apr 29, 2024
2d4cee3
Code Base
Reed-Shaw Apr 29, 2024
7bfe71a
Items, updates to executeAction
Tslos Apr 29, 2024
ae6606c
Merge branch 'tillie' of https://github.com/Tslos/CSC120-FinalProject…
Tslos Apr 29, 2024
a486aaa
Added game loop- running without action options
Reed-Shaw Apr 30, 2024
6518985
it works now!
Tslos Apr 30, 2024
9eda7d2
Merge pull request #13 from Tslos/tillie
Tslos Apr 30, 2024
4ce1db7
Merge branch 'reed' into main
Tslos Apr 30, 2024
631429b
Merge pull request #14 from Tslos/main
Tslos Apr 30, 2024
4ca2b33
Update Game.java
Reed-Shaw May 2, 2024
54dbef1
Doc strings added
Reed-Shaw May 2, 2024
291133f
Final Touches Demo Day
Reed-Shaw May 2, 2024
72c3191
see past places
Tslos May 2, 2024
7c5e4cd
Merge pull request #15 from Tslos/tillie
Tslos May 2, 2024
507a07f
Merge branch 'main' into reed
Tslos May 2, 2024
dbf6ce3
Merge pull request #16 from Tslos/reed
Tslos May 2, 2024
33b66be
fix } issue
Tslos May 3, 2024
4786b5a
arch diagram update
Tslos May 3, 2024
994e6c1
final proj meeting push (bye bye item stuff)
Tslos May 4, 2024
739d9bc
code changes (make graph immutable, delete Item.use()
Tslos May 6, 2024
584d12d
delete extraneous files
Tslos May 6, 2024
1c0674b
final map + architecture diagram
Tslos May 6, 2024
625d9f3
Merge branch 'main' into tillie
Tslos May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"java.project.referencedLibraries": [
"lib/**/*.jar",
"guava-31.1-jre.jar"
]
}
Binary file added Architecture Diagram Updated 5.2.2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CSC 120 final map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Final Architecture Diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
389 changes: 389 additions & 0 deletions Game.java

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions Item.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* The item class creates items that have names, descriptions, and (if they can only be used a set number of times)
* sets their limited use and how many times they can be used.
* @author tillie
*/
public class Item {
String name;
String shortDesc;


public Item(String name, String shortDesc) {
this.name = name;
this.shortDesc = shortDesc;
}
public Item(String desc) {
this.name = desc;
this.shortDesc = desc;
}


}
79 changes: 79 additions & 0 deletions Place.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import java.util.ArrayList;

/**
* The place class creates the rooms that the player can exist in. These places will be added to the map. The places
* have a name, descriptions, and a boolean stating if it needs a key to be entered. Each place also has an
* inventory that can be added to and taken away from.
*/
public class Place {
public ArrayList<Item> inventory; // an arraylist of interactable objects within a given place
public String name;
public String shortDesc;
public String longDesc;
public String needsKey;
public boolean explored;


public Place() {
this.inventory = new ArrayList<Item>();
this.name = "name";
this.shortDesc = "shortDesc";
this.longDesc = "longDesc";
this.needsKey = "none";
this.explored = false;
}


public Place(String name, String shortDesc, String longDesc, String needsKey) {
this.inventory = new ArrayList<Item>();
this.name = name;
this.shortDesc = shortDesc;
this.longDesc = longDesc;
this.needsKey = needsKey;
this.explored = false;
}

public Place(String name, String shortDesc, String longDesc, String needsKey, boolean explored) {
this.inventory = new ArrayList<Item>();
this.name = name;
this.shortDesc = shortDesc;
this.longDesc = longDesc;
this.needsKey = needsKey;
this.explored = explored;
}

/**
* a getter method that returns the name of the place
* @return a String containing the name of the place
*/
public String getName() {
return(this.name);
}

/**
* a getter method that returns the color of the key needed to enter a room.
* @return a string containing the color of the key needed to enter a place.
*/
public String getKeyColor() {
return(this.needsKey);
}

/**
* a method that allows an item to be added to the place's inventory
* @param item an item that will be added to the place's inventory
*note: there is a check that makes sure an item won't be added to a place's inventory twice.
*/
public void addItem(Item item) {
this.inventory.add(item);
}

/**
* a method that removes an item from the place's inventory.
* @param item an item that will be added to the place's inventory.
*/
public void removeItem(Item item) {
this.inventory.remove(item);
}


}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@

## Additional Reflection Questions
- What was your **overall approach** to tackling this project?

- What **new thing(s)** did you learn / figure out in completing this project?

- Is there anything that you wish you had **implemented differently**?

- If you had **unlimited time**, what additional features would you implement?

- What was the most helpful **piece of feedback** you received while working on your project? Who gave it to you?

- If you could go back in time and give your past self some **advice** about this project, what hints would you give?

- _If you worked with a team:_ please comment on how your **team dynamics** influenced your experience working on this project.

Binary file added guava-31.1-jre.jar
Binary file not shown.
Binary file added lib/hamcrest-core-1.3.jar
Binary file not shown.
Binary file added lib/junit-4.13.2.jar
Binary file not shown.
38 changes: 20 additions & 18 deletions rubric.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
## Front-End Design (10 pts)

_____ 2 pts: Game has a **robust, understandable text-based interface** that allows the player to control their movement through the game. Player should be able to enter any command at any time, and if it makes sense in the current context it will be carried out.
**YES** 2 pts: Game has a **robust, understandable text-based interface** that allows the player to control their movement through the game. Player should be able to enter any command at any time, and if it makes sense in the current context it will be carried out.

_____ 2 pts: Submission includes a **cheat sheet** (`cheatsheet.md`) documenting all of the available commands, as well as a **description of the layout** of your game world's underlying physical layout; this can be described in words, or included as a separate image file if you prefer to sketch a map by hand. If your game includes **challenges** that must be overcome to win, also describe them here.

_____ 2 pts: Storyline driving the game is **engaging**, and individual elements of play make sense within the context of the story.
**YES** 2 pts: Storyline driving the game is **engaging**, and individual elements of play make sense within the context of the story.

_____ 2 pts: Game has **multiple possible paths / outcomes** (i.e. gameplay depends on player's choices and is not the same every time).
**YES\*** 2 pts: Game has **multiple possible paths / outcomes** (i.e. gameplay depends on player's choices and is not the same every time).

_____ 1 pt: Gameplay supports **reversible moves** where reasonable (e.g., if you pick up an object, you should be able to put it back down again later, possibly in a different place; if you go north then you should be able to return to the previous location by going south unless something has blocked your return path).
\* The game has one "win path" but it is possible to wander around lost/confused for a while without conequence before finding the win conditions. Also, there's the basement which is just there for fun and has absolutely 0 effect on the game's final outcome.

_____ 1 pt: Some paths through the game have **restricted access** until the player has completed a task or acquired a specific item (i.e. a key to open a door, etc.).
**YES** 1 pt: Gameplay supports **reversible moves** where reasonable (e.g., if you pick up an object, you should be able to put it back down again later, possibly in a different place; if you go north then you should be able to return to the previous location by going south unless something has blocked your return path).

**YES** 1 pt: Some paths through the game have **restricted access** until the player has completed a task or acquired a specific item (i.e. a key to open a door, etc.).


## Back-End Design (10 pts)

_____ 2 pts: Selected classes(s) are **effective, efficient** at supporting the desired operations and program behavior.
**YES** 2 pts: Selected classes(s) are **effective, efficient** at supporting the desired operations and program behavior.

_____ 2 pts: Design justification includes a discussion of at least one (reasonable) **alternative design** that could have been used, and the reasons why you decided against this alternative.

_____ 2 pts: The project makes effective use of **Java built-in classes** whenever they are appropriate.
**YES** 2 pts: The project makes effective use of **Java built-in classes** whenever they are appropriate.

_____ 2 pts: The project's design is **extensible** (i.e. someone else could pick up where you left off, adding on or modifying the game without requiring a total rewrite).
**YES** 2 pts: The project's design is **extensible** (i.e. someone else could pick up where you left off, adding on or modifying the game without requiring a total rewrite).

_____ 2 pts: Submission includes an **architecture diagram** describing the relationships between all classes.
**YES** 2 pts: Submission includes an **architecture diagram** describing the relationships between all classes.


## General Items (10 pts):
_____ 4 pts: Program compiles without errors or warnings.
**YES** 4 pts: Program compiles without errors or warnings.

_____ 2 pts: Executes fully & consistently without crashing (exception/freeze).
**YES** 2 pts: Executes fully & consistently without crashing (exception/freeze).

_____ 2 pt: Complies with style guidelines (missing items 1 pt each):
**YES** 2 pt: Complies with style guidelines (missing items 1 pt each):

_____ Classes & class members all have Javadoc header comments.
**YES** Classes & class members all have Javadoc header comments.

_____ Clear and consistent indentation of bracketed sections.
**YES** Clear and consistent indentation of bracketed sections.

_____ Adheres to Java conventions on naming & capitalization.
**YES** Adheres to Java conventions on naming & capitalization.

_____ Methods & variables all have clear and accurate names.
**YES** Methods & variables all have clear and accurate names.

_____ Methods avoid confusing side effects.
**YES** Methods avoid confusing side effects.

_____ 1 pt: All required files included with submission (including completed checklist file).

_____ 1 pt: `readme.md` contains your reflection on the project and responses to all prompts .
**YES** 1 pt: `readme.md` contains your reflection on the project and responses to all prompts .