Beruflich Dokumente
Kultur Dokumente
Log 2 7/02/18
Hello! Today I made a player class. The player has important
variables about themself (eg. name, health, location, etc). The
tricky part of today was trying to develop a ‘move’ function, for the
player. This would automate most of the moving process.
Log 3 11/02/18
What does a “move” function need to do? There are many steps:
-show player the possible movements
-ask which direction user would like to go
-use this information to transform player.coord
-use player.coord and room_index.ri to find the correct Room object
-do something with this new room information. Eg “hi! You are in
[player.room.name]”
To see the proper logic for my move function, check out the diagram I
made in the flowchart tab.
Log 4 26/02/2018
It is week 5! I’m trodding along pretty successfully. It is well
aligned with my gantt chant
I’ve thought of a concept for my game. The concept is that the player
can choose who they play as at the beginning of the game. This will
have consequences, like a special soundtrack for each character.
This week I have been working on items. Ideally the player will be
able to:
- Equip a weapon
- Use a potion (to heal health)
- Check inventory
The first thing i did to accomplish this was create a class (a
scaffold) for potions and for items.
Then I made functions for the player to ‘use_potion’, ‘equip_weapon’
etc.
The final thing I needed to do today was delete the items from the
player’s inventory once they used them. To give an example, before I
fixed my code, my character could drink infinite green potions
without ever running out of potions.
After seeing this information, I still had some questions about how
the ‘use’ function worked. To figure it out, I started up a new
terminal and experimented:
This was successful! It printed out [2,3,1], which indicated that the
first a of ‘list_’ had been removed. All had to do next was implement
this coding idea into my game, and then I was done :)
Log 6 21/03/2018
It is week 8 and I am trodding along with my game. I am nearly
finished the fight function.
I just had to revisit and fix my “look at inventory” option. All the
invalid responses gave the error “too many words”.
TESTING TABLE
Even though I had accounted for different reasons that there could be
an error, I was still giving the same incorrect response. A pretty
silly mistake :’). Luckily, it was very fixable: I just changed what
each conditional error message said.
Log 7 26/03/18
if self.name == ‘yun’
Do this, do that
Log 10 7/04/18
Hi. Welcome to SUPER SPEEDY CODING. Today and last night I have been
editing my code at LIGHTNING SPEEDS to meet the Monday deadline.
Here is my main action menu, and a testing table showing what each of
its reactions are.. Because I have already finished, most of the
expected output matches with the actual output.
TESTING TABLE: MAIN ACTION MENU w/ doors = [“right”, “down”]
Input Expected output Output
move right Calls the move Calls the move function (and
function (and changes changes player’s location)
player’s location)