ISU Term 1 Culminating Activity Daily Journals
- Etienne Caronan
- Nov 25, 2015
- 4 min read
In my journals you will find the daily struggles that I encountered as I made this program:
_______________________________________________________________________
November 12, 2015: This was the day I decided to do Deal or no Deal, it seemed like a very simple and easy program to write but it was not. Today, I didn't do any coding but rather I brainstormed ideas. I also used this day to find inspiration for my program, as I was surfing the internet. Today was also the day when I wrote up my proposal and the pseudocode for my program.
_____________________________________________________________________
November 16, 2015: Today was the start of my very daunting task. At first it felt like such an easy task considering that I only needed to use listboxes, pictureboxes and buttons something that felt like was innate knowledge. Not much was done today as I was busy studying for an Advanced Functions test however, I was able to put together the base GUI of my program.
_______________________________________________________________________
November 17, 2015: Today I started doing the coding, I encountered quite a few problems. In the game Deal or no Deal, there are prizes that range from $2 , $50,000 , $100,000 $ 2,000,000 these were set values so I had to populate an array for these values. I also realized that I was not able to assign an integer to a picturebox since the values do not correspond therefore, I resorted to adding values to listboxes. However, despite the use of the random function the numbers were always to repeating.
_______________________________________________________________________
November 18, 2015: Today I was not able to accoplish much but I solved one of the most vital issues in my program. The issue was that there were repeating values whenever the game started, so at times there were two $2,000,000 prizes. I found out that I had to make the array for the values into a list. The difference between a list and array is that you can remove the elements in the list. For example: dim jay as a list (25), jay(24).remove. <------- The 24th element in the list is removed. What I had to use a list from 0 to 25, then get a random element. After that I assign that value to a variable and that variable sends it into the array. Lastly, once that element gets chosen it is removed from the list. This loop is repeated until the program gets all 26 values.
_______________________________________________________________________
November 19, 2015: Today, i had to write up an algorithm for the dealer's offer. The dealer's offer is based off of the remaining values in the unopened cases. What I had to do was get the remaining values and get its total average. This code was rather simple since my class was proficient in manipulating loops. What I had to do was that set a constant for the amount of cases total = 26. So, everytime a user picks a case amount of total cases was subtracted by 1 and that value gets sent up to the function (dealer's offer). There was one issue that I did encounter which was that everytime a user opens a case I could not remove the element assigned to that case therefore it would affect the offer amount. I attempted to change that an array into a list but, due to my limited knowledge and despite all my research on the internet I could not find a code that gets me the total sum of the list. I compensated for this by diming the element into 0, which essentialy removes that element from the equation in the Function (dealer's offer). I was also able to come up with the algorithm that stops the game (by disabling all the cases) and gives the user an offer. It was fairly simple, I used a constant which is equal to 0 and everytime the user picks a case the program adds +1 to the constant. I was able to disable all the other cases through the use of the IF command. So, whenever const = 3 I used a loop which disabled all the pictureboxes in the picbox array. Then, the deal or no deal button shows. If user pick deal, the game ends otherwise, the game continues and all picboxes are enabled. Today was the most productive day I had.
_______________________________________________________________________
November 20, 2015: Today the program was essentially done I just had to fix a few bugs in it. They were very simple bugs such as some pictureboxes that are still enabled despite the constant being equal to 3. The issue was that I did not include them into the array.
_______________________________________________________________________November 21, 2015: Today was the day I finished my program by adding some small features to it such as a button which opens a dialoug box that explains the premise of the game. I also polished my program aesthetically by adding pictures for the cases, a background for the main menu and the game and the picture of the game host.
THIS IS THE END OF MY JOURNAL. THANK YOU FOR READING
Comments