F. Discussion

Creating these two MATLAB games was a very involved and challenging process. The development began with brainstorming the initial plan for the two chosen games, War and Yahtzee. Preliminary algorithms/pseudocode were then created. The actual coding of the games started with reviewing and implementing the given display files for dice and playing cards. The algorithms were then transcribed into a working code based on MATLAB principles learned in and outside the classroom. The testing process played a vital role in debugging the program by finding issues that were not obvious to see. For instance, when War was tested it was discovered that the program would crash if two ties occurred consecutively. This issue led to the decision to alter the original code by adding a check within the while loop that accounted for multiple consecutive ties. While testing Yahtzee, difficulties arose while trying to edit the scoreboard. The original algorithm had to be changed once again as we altered our code to resolve this issue. Testing the game multiple times throughout the coding process resolved many unexpected issues that occurred and acted as an experiment which eventually led to the final results of our finished MATLAB games.