I just started a programming 100 course in college and they have given an assignment out that deals with a bunch of "idiot bowlers". In it, I would have to declare a variable, lets call it 'b1' for ball one. If they get a strike, a strike is 10 pins. But the scoreboard shows an X, not a 10. I have to retain this X so once the game is over, the final scoreboard shows all of the values for all of the balls thrown, excluding 10 of course because those are all strikes (there are no spares in this game, and only three frames 1,2,3). 
We just learned if and else statements, so I'm assuming the program is centralizing on this concept. Also, we recently learned about prototypes and declarative statements.
Example
			
			We just learned if and else statements, so I'm assuming the program is centralizing on this concept. Also, we recently learned about prototypes and declarative statements.
The Game:
* There are three Frames. [[I'm only worried about the first two at this point]]
* In each Frame you roll a heavy ball at triangular arrangement of 10 pins in the attempt to knock them over.
* After each frame the 10 pins are reset to their triangular arrangement.
* For the first and second Frame you roll your ball at the pins and note how many you knocked over.
1. If you knocked them all over it is deemed a Strike.
2. If you have not knocked them all over then you roll your ball again, at the pins remaining, and note how many more you knocked over.
1. If you knocked the rest over it is deemed a Spare.
Example
I keep getting errors when I try to make that 10 into an X, not by saying b1 = X, but I'm trying everything else I can think of and I keep coming up short.Enter pin total for 1st ball in frame 1 : 2
Enter pin total for 2nd ball in frame 1 : 7
Enter pin total for 1st ball in frame 2 : 10
Enter pin total for 1st ball in frame 3 : 4
Enter pin total for 2nd ball in frame 3 : 6
Enter pin total for 3rd ball in frame 3 : 9
Frame Ball 1 Ball 2
------------------------------
1-------- 2------ 7
2-------- X____ -
3-------- 4------ 6
 
				
		 
			 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		
 Facebook
Facebook Twitter
Twitter