Dana Vrajitoru
B583/C490/I400 Game Programming and Design

B583/C490/I400 Homework 2

Due Date: Wednesday, September 7, 2022.

In this homework we will complete the implementation of the game Sum Zero that we started in Lab 2.

Ex. 1. Complete Lab 2.

Ex. 2. Add the following functionality to the application after you complete the lab:

a. Modify the function MakeSolution() in the class FrameManager so that the numbers tile1, tile2, and tile3 are chosen randomly. Any solution is acceptable as long as you insure that the 3 numbers are different from each other.

b. Implement a function called CloseOpenTiles() that closes all the open tiles from 0 to countOpen-1, then resets sum, countOpen, and timeLeftToClose. Call this function inside the function Update in the class FrameManager in place of closing the most recently opened tile. Test that countOpen being greater than 0 instead of chosenTile[0] not being -1 before you call this function.

c. Finish the implementation of the function PlayTile() in the class FrameManager. Here is what the function should do:

d. Implement the function GameWon() to be called when the game is won. Before that, create a new object that you can call winMessage to be displayed when the game is won. You can use a text mesh with a message such as "well done" or "you can proceed through the gate". Or, if you think it easier, you can create an external image for this purpose and import it. Deactivate this object after you create it to hide it from the screen until it is needed. In this function, proceed the following way:

e. Build an executable for Windows or WebGL. Create a zip file with the entire Build folder and the two script files (.cs).

Turn in: the zip file containing the two script files and the build folder, to Canvas, under Homework 2 in Assignments.