Python Work

This first part of my python code imports the needed elements like randomization and the pygame software. We then define the different possible evnts that can happen when we move to a new area, these are drowning, catching a fish and finally finding all of the fish. After that I define all of the realtionships between north, east, south and west of each location so that we know where we are and what happens in each direction.
We continue with the difining of realtions here and describing if we've visited each area or not yet.
In this part of the code we allow the computer to define what keypresses are, we then define how we want the colors to look in the images. Then we set up pygame so that it can show images, after that we have the code that changes where we start and then what the caption font will be under the images. We then create the code that will turn on pygames and turn off the code when pygames is quit. This last bit of code will turn of the program if you press R or go into a wrong area.
This last bit of code defines what each keypress does and how it should change the image and text accordingly with the last part telling the code what to do once pygames is quit.

Go to Index page