|
Post by gundamf91 on Nov 27, 2001 20:56:09 GMT -5
i couldn't have finished this program this fast without you guys' help thanks alot wow i'm proud of myself, i made my first game gundamf91
|
|
|
Post by 1.8T on Nov 28, 2001 1:01:57 GMT -5
yah. finally done~! ;D ;D just thought i borrow gundamf91's words and thank everyone who helped.,. , one last q, if user enters a letter., how do we reject that? i used the lame method of making a conditional statements that only accept 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 but then i figure if they change the grid size, then this conditional statement would have to change accordingly.. hmmmm. ,, . i know we don't hafta do this., since we're told that user would only input integers., but i still find it a flaw in the game if it crashes whenever someone enters a letter./. or any character other than a number.. ., so .,,. just wandering., ., ...
|
|
|
Post by Observer on Nov 28, 2001 1:57:02 GMT -5
I'm not worrying about doing anything. It probably wouldn't take too much time to do something about it but since we know for sure that nothing other than integers will be input by the testers/TAs I'd rather just worry about getting PS9 done.
Btw gundam, that picture is incredibly distracting. I don't mean that in a negative way or anything, in fact, why not post more often ;D
|
|
|
Post by Brutal_Chicken on Nov 28, 2001 6:31:01 GMT -5
1.8T you don't have to worry about incorrect input since we can assume they'll be inputting integers. We can't assume, however, that the integers they're inputting are within the grid that we've made so that's the only thing we have to account for.
My program crashes if I just press enter for example. I could change it so that it does accept it but...
|
|
|
Post by gundamf91 on Nov 28, 2001 13:48:20 GMT -5
i agreed with chicken
quoted from Summary: "You may assume that the user will type an integer in each case, but you may not assume that the integer is within the bounds of the grid. Therefore, you must check to see if the row and column are valid integers (within the grid size), and take appropriate action if they are not. Appropriate action means that an 'out of bounds' guess should not impede the playing of the game: you might ask the user to try again, for example, or you might just discard the user's guess which will in effect cause the user to lose that turn. "
gundamf91
|
|
|
Post by 1.8T on Nov 28, 2001 15:40:50 GMT -5
yup, i did that., if i enter anything out of the grid , it'll just miss that turn,. and same for when u press enter., it'll say invalid input.,..,
i know the ta's will only enter integers., but i'm just saying out of curiosity., how u would take out entries that are not numbers../
|
|
|
Post by gundamf91 on Nov 28, 2001 17:15:43 GMT -5
i didn't think very seriously about this but i would use ASCII codes to compare and chop those possibilities away
|
|