Sun, 22nd Nov 2015, 01:48 Re: Lab 4: Backspace



I wasn't sure if I needed to send this to all of you, finally I decided to
err on the side of providing more rather than less, since several students
have asked some variation of this question.

A student writes:


> Hi Dr. Patt,While testing my game I realized that if a player makes a
> mistake by hitting an incorrect key and then hits backspace to try to erase
> that character, my program outputs to the screen a "blank" character
> followed by the "Invalid move..." string and asks again for a move.
> Is this okay?
>
> <<name withheld to protect the student whose players use the backspace key>>


The most common variation is: What if a student types an illegal move, but
then backspaces and ends up with a legal move.  What should my program do?

We could make your program account for this, but that would add complexity
that I do not think is necessary right now.  So, having your program respond
with "Invalid move..." is fine.  For example, "DC3" would result
in an invalid move.

As far as your program is concerned, a valid move consists of exactly what
the assignment says, with no "erase" or whatever thrown in.  Everything else
is an invalid move.  OK?

Good luck finishing the lab and enjoying Thanksgiving.



Yale Patt