Working on Breeding.
every 33 frames (~1s) In the aquarium Update method, we check if the Angels or Cat fish are doing Sex. With the class CBreeding::CheckAngelsHadSex(). It is possible because the Breeding Visitor has a list of Angels and Cat Fishes on the aquarium, and check if every fish is overlapping each other. Check if they have different gender and if they are interested. If all is true, it makes the female fish be pregnant.
Variables to manipulate for testing are mPregnantDay, maxPregnancyDays, and mDaysSinceSex which are located in both CFishAngel and CFishCat.
Working on Animated Chest.
Created a new decor item called Sparty Treasure Chest. The chest will be closed for a brief period of time before changing images to simulate the chest opening up and revealing what is inside of it. Every time the treasure chest fully opens, a bubbles object will be created with a random x and y speed attribute. The bubbles image will move to the top of the screen and be deleted when it reaches the top of the screen. The treasure chest will remain opens for another brief period of time before changing images again in reverse order to simulate the chest closing. To add a Sparty Treasure Chest, the user must click Sparty Treasure Chest under the Add Decor tab in the Menu. Variables for CDecorSpartyTreasure are mCurrentImage (used to keep track of the image currently being shown which is then used in the SetImage function in CItem to change the image of the chest, similar to how road tiles were changed in Step 4), mOpening (used to state if chest is opening or closing, this way the correct image number can be set to SetImage in order to change the image), mPause (used to alert the program that the chest is either completely opened or closed and should remain in this position for a brief period of time), mTime (keeps track of the amount of time that has gone by through multiple Update calls as the parameter "elapsed" is added to it every time Update is called. Then once the appropriate amount of time has passed, the image is changed and mTime is set back to 0), mX (the x-coordinate location of the chest), and mY (the y-coordinate location of the chest). Variables for CAirBubbles are mSpeedX (the speed of the bubbles image in the x direction) and mSpeedY (the speed of the bubbles image in the y direction).
Working on Environment.
Every 33 frames the method CheckFishFood() and DirtyTank() are called. CheckFishFood runs through each fish in the aquarium and uses the FeedFish Visitor subclass to check if the food has dropped to or below zero and will remove the fish if so. The DirtyTank() function will every one second start to dirty the tank by changing the images every 10 cycles (roughly ten seconds). In the Menu Feed and clean uses a visitor that resets the food of each of the fish and call a function in aquarium to reset the clean counter respectively.
The variables for feeding are mFood ("days" a fish can go without food in seconds) and mDaysSinceFed ("days" since the fish was fed in seconds) These are located in the CFish class. The actual assignment of values occurs in the constructors of the different types of fish.
For the game the team has decided that we wanted to make it a little like sims. You gain points for feeding the fish and cleaning the tank, but lose points if the fish die and for every second the tank sits at extremely dirty. When the fish get hungry or sick their image changes to reflect the change. Points can be spent to buy decoration items, and the treasure chest has a chance of spawning a random fish when it opens.
Instead of feeding all the fish, feed drops a set amount of fish food into the tank, so feeding larger groups is harder. The tank will also dirty faster as there are now more fish.
When fish breed there will be a chance of them choosing a fish that is not the same as themselves and creating a hybrid fish.