-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevlog.txt
More file actions
220 lines (187 loc) · 11.5 KB
/
devlog.txt
File metadata and controls
220 lines (187 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Turtles
Jen Yu
Eugene Thomas
Allard Peng
pd 3
---------------------
El Cazador
/////////// Zone of Reflection \\\\\\\\\\\
------------------------------------------
OBSTACLES OVERCOME
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- There were issues with methods being static and nonstatic, which were fixed by instantiation.
- At first, we were unclear on our vision of how to code the driver. Using a Grid object was a given, but what we mainly debated over was the usage of an object vs. a 2D Array in order to represent the empty spaces in the Grid. In the end, we settled on the object, because it was easier to assign attributes, instance variables, and use instaceOf to determine what it was.
- What should be in an MVP? We discussed this, about what aspects were necessary and what weren't. In the end, we decided that the physical Grid parts and the parts where empty squares with no predators/prey around them were not necessary towards functionality, and were best wrangled with later.
- Arguments about superclasses vs. interfaces. In the end, we decided to use the Animal superclass and not define each individual animal in a class, but rather spawn either a Predator or a Prey. Both Predator and Prey are subclasses of Animal, so when the driver is run and the grid is created, one variable type takes care of both of these objects.
- Time Management. Early on, we split up the work, but some of the kinks hadn't been worked out yet, so we fell a little behind. However. this project in its MVP version should work fine.
- Was criticized by Konstatinovich for having a public variable. Made all variables either private or protected out of shame. In order to retain access, wrote Accessor and Mutator methods. [Jen]
- Could not access some mutators and accessors. Fixed by TYPECASTING!!
- There was a big bug where if you were to hit upon a square with nothing around it, and it too had squares surrounding it that had nothing around them, then the program would launch into an enormous forever loop. I [Jen] was in charge of diagnosing and fixing this bug (it's within the code I wrote, after all) and eventually, I realized that first, as mentioned above, it would only go into the forever loop in the case that the square with nothing around it also had squares around it with nothing around it. If the square with nothing around it had surrounding squares that all had predators and prey around them, then the program would run fine. What I also discovered was that the program would keep checking the same coordinates over and over again. Why? Because when I invoked checkGrid() [checks the grid at a certain coordinate for the stuff around it] on the surrounding squares, I DIDN'T ADD THESE SQUARES TO MY ARRAY OF USED COORDINATES. I only added in used when I asked the user for them; I didn't realize I had to add them in when the progrma decided to check squares by itself. So I just made sure the coordinates hadn't already been visited, and if they hadn't, then to invoke checkGrid() on those coordinates. This way, there wasn't the constant yo-yoing of checking coordinates with nothing around them; they would've already been established as surrounded by empty squares.
- When creating commands, sometimes when an integer string was entered for an x and y coordinate, the program was unable to parse it and instead regarded it as a command. After extensive searching, found the .trim() method. Turns out, there was a space behind the coordinate, which was why the program was unable to parse, and had to resort to the catch block.
- In some cases, not enough predators with heavy enough damages were spawned in order to kill the Cazador. This created a situation where there was no way the player could lose the game. Fixed this by rewriting the populate method in Grid.java, where total damage inflicted by all predators must be at least 100 HP.
UNRESOLVED ISSUES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COOL STUFF LEARNED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 2D Arrays are annoying, but we ended up using a lot of it.
- How to use the Scanner class (sort of). Better understanding gained of try and catch blocks!
- Better understanding of private vs. public; wrote accessors and mutators in order to modify private variables
MID-DEVELOPMENT DESIGN CHANGES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Changed from empty square to the "ghost" concept, back to creating an array storing # of predators/prey around a box
- ANDDD changed back to the object, now named Empty
- For nice grid display, changed the names of the animals into 5 letter formats.
- If there were only predators or only prey nearby, the quantity of the other would still be displayed. To clarify, if there were 2 predators around a square, but no prey around, the square would display "+0,-2", which was different from planned; before, it was planned to just have displayed "-2". This was to make the grid look nicer and not incorporate as much string manipulation.
- Squares with nothing surround them display "+0,-0", which was different from planned. The planned version didn't touch specifically on what these squares would display, but not that LOL
- Commands! Originally a stretch...but it was done.
- Exit early option, and playing the game again. These options were added mid-development in order to create a more user friendly game.
- Toggle option; added an option for users to be able to see where they roamed when there was nothing near them, or to turn it off if they didn't like the excessive printing.
LESSONS LEARNED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- noSleep CS = new noSleep();
- noSleep instanceOf FatigueAndPain
- FatigueAndPain extends WhyIDoDis
- When there is no bug: Love for CS > 100
When there is a bug: Love for CS < 0
When you fixed a bug: Love for CS >>>>> 9000
- if (didNotPullBeforeYouPushed() == true){boolean sadLife = true;}
- There's a lot of problems to account for that you only realize once you begin to code...
______ ______ __ __ __ ______ _______
/_____/\ /_____/\ /_/\ /_/\ /_/\ /_____/\ /______/\
\:::_ \ \\::::_\/_\:\ \\ \ \\:\ \ \:::_ \ \\::::__\/__
\:\ \ \ \\:\/___/\\:\ \\ \ \\:\ \ \:\ \ \ \\:\ /____/\
\:\ \ \ \\::___\/_\:\_/.:\ \\:\ \____\:\ \ \ \\:\\_ _\/
\:\/.:| |\:\____/\\ ..::/ / \:\/___/\\:\_\ \ \\:\_\ \ \
\____/_/ \_____\/ \___/_( \_____\/ \_____\/ \_____\/
==============================================================
**Detailed Devlog begins 1/12.
01-22-17
--------------------------------------------------------------
ET:
- Edited descriptions for Patricia and Jessica
JY:
- Wrote a new populate function for Grid.java that ensures enough predators are spawned to kill the Cazador
- Changed spacing and design in Woo.java
- Finished flowchart and UML diagrams.
01-21-17
--------------------------------------------------------------
ET:
- Edited README file
- Wrote the instructions for the game
- Added mechanism for the option to play again, or exit at the end of the game
- Wrote storyline for v.1.5 (but not final storyline...yet).
JY:
- Edited README file
- Redid the Description
- Added code blocks
- Used <pre> to add the artsy ASCII heading
- Added "realAnimals.java" interface [Renamed RealAnimals.java in v.1.5 Cazador upwards]
- Update: "RealAnimals.java" is in root.
- Added personalized end stories (based on the predator that kills you, or the last prey you catch, your exit story will be different).
- ArrayList<String> endStories
- Added mechanism for displaying the personalized end stories in Woo.java (involves ask() returning an array, so there are some useless return statements).
- Added commands in the game [details in README]
- Mechanism for exiting early
- General storyline created
01-20-17
--------------------------------------------------------------
ET:
- Edited README
- Added an ASCII heading to README
- Added an ASCII heading to Woo.java
JY:
- Began work on final flowchart
01-19-17
--------------------------------------------------------------
AP:
- Made an expandable Grid.java
- Grid now can be between 9x9 and 16x16
- Fixed HP == 0 to HP <= 0
- Added mechanism of viewing how many prey needed to catch
JY:
- Added the updating prey mechanism (after each catch, number of prey remaining printed)
- Changed exit to numPrey == 0, not numPrey == CP
01-18-17
--------------------------------------------------------------
JY:
- FINALLY DEBUGGED THE CODE
- Escaped state of pain and suffering into a state of jubilation
- Wrote the gameplay toString() method for Grid.java
(Basically, the grid is made, and the game is presentable-worthy :D)
- Added method setSusName() for Empty.java (Also added abstract to Animal.java)
ET, AP:
- Edited README
01-17-17
--------------------------------------------------------------
ET, AP:
- Edited README
- Launch Instructions, gameplay, short descript of game
JY:
- STILL trying to debug BS
- Accidentally made a grid while trying to fix bug. Guess this is the actual gameplay grid now.
- Added new ArrayList<String> susNames of five letter abbreviations for animal names
- Added method getSusName() (Also added abstract to Animal.java)
- Edited toString() for Grid [Also added an overloaded toString(), for diagnostics]
- Realized the bug but still can't fix it
- Still in a state of pain and suffering
01-16-17
--------------------------------------------------------------
JY:
- Still trying to debug surround squares
- Added too many diagnostic print statements
- In a state of pain
01-15-17
--------------------------------------------------------------
JY:
- Was trying to debug the surround squares
- Added mechanism of printing stories when either prey or predators are caught
- Added new ArrayList<Integer> damages to Predator class
- Added mechanism of personalized damages based on the type of predator spawned
01-14-17
--------------------------------------------------------------
JY:
- Final List of Predators: Jen the Jaguar, Zoey the Zebra, Bonnie the Bear, Dasha the Dartfrog, Masha the Mammoth, Yiling the Yak, Cody the Crocodile
- Final List of Prey: Ida the Iguana, Rachel the Rabbit, Jessica the Jellyfish, Patricia the Pangolin, Eugene the Egret, Allard the Armadillo, Jenn the Jackrabbit
- Completed stories ArrayList<String> READ THE PREY AND PREDATOR FILES TO SEE THE STORIES
01-13-17
--------------------------------------------------------------
JY:
- Edited comments in code
- Began work on creating the storyline of the game
- Added new ArrayList<String> stories to both Predator and Prey
- Uploaded most recent flowchart made with draw.io
01-12-17
--------------------------------------------------------------
JY:
- Edited Animal.java, Prey.java, Empty.java (overloaded),
Predator.java, Cazador.java. Removed certain methods and changed
signatures. Everything is denoted in comments in code.
- Wrote Woo.java, the driver file. It is very long, but also
thorough. Should be pretty clean. Check it out, comments are
inside the code for comprehension.
- Tidied up all .java files: added comments, fixed formatting,
other things that trigger my strange OCD.
01-11-17
--------------------------------------------------------------
ET:
Empty.java; Animal.java; Prey.java; Predator.java; populate
method for Grid; You.java (deleted); Grid2.java (ET)
JY:
Cazador.java
AP:
Grid.java
01-10-17
--------------------------------------------------------------
JY:
Worked on Flowchart
AP:
Grid.java
01-09-17
--------------------------------------------------------------
ET, AP:
Worked on UML Diagram
01-08-17
--------------------------------------------------------------
JY:
Worked on Project Proposal
==============================================================