simulation and design thoughthings probably won' go quite so smoothly stay with it--the more you do itthe easier it will get initiallyyou may think writing all of those functions is lot of trouble the truth isdeveloping any sophisticated system is virtually impossible without modular approach keep at itand soon expressing your own programs in terms of cooperating functions will become second nature bottom-up implementation now that we've got program in handyour inclination might be to run offtype the whole thing inand give it try if you do thatthe result will probably be disappointment and frustration even though we have been very careful in our designthere is no guarantee that we haven' introduced some silly errors even if the code is flawlessyou'll probably make some mistakes when you enter it just as designing program one piece at time is easier than trying to tackle the whole problem at onceimplementation is best approached in small doses unit testing good way to approach the implementation of modest size program is to start at the lowest levels of the structure chart and work your way uptesting each component as you complete it looking back at the structure chart for our simulationwe could start with the gameover function once this function is typed into module filewe can immediately import the file and test it here is sample session testing out just this functionimport rball rball gameover( , false rball gameover( , false rball gameover( , true rball gameover( , true have selected test data that tries all the important cases for the function the first time it is calledthe score will be to the function correctly responds with falsethe game is not over as the game progressesthe function will be called with intermediate scores the second example shows that the function again responded that the game is still in progress the last two examples show that the function correctly identifies that the game is over when either player reaches having confidence that gameover is functioning correctlynow we can go back and implement the simonegame function this function has some probabilistic behaviorso ' not sure exactly what the output will be the best we can do in testing it is to see that it behaves reasonably here is sample session