Brian Derr
bderr@myrealbox.com


10/27/2002
   Working on setting up information exchange between Answer and Guess class
   without a client program, need to figure out how to do that!  Once that is
   done then I can set up comparing the user guesses to the random numbers.

10/31/2002
   Getting a lot closer to finishing the "backend" of the project up!  By
   tomorrow, hopefully, I'll have it fully functional.  Then I get to start
   working on the user interfaces.  

11/01/2002
   Got it working for the most part, expect a few bugs that I am trying to iron
   out.  Namely, Guess::markers[] isn't working correctly.  It is taking the 
   same numbers as Answer::answer[] which it isn't supposed to do.  Also after
   a read Guess::guess[] isn't working quite right either.  All things to fix
   a little later.

11/02/2002
   Fixed a really weird bug, if wMarker and bMarker were both '0' then the game
   would segfault.  Not a big chance of catching that by myself but I guess I
   got lucky!  :-)

   Looks like there is a problem in the way Guess::isValid() is saving the
   user input to the guess[] array.  I might have to rewrite that sucker to
   a) make it more efficient and b) work!

11/05/2002
   I got Guess::markers[] to work!!  However, now that I got it working I found
   a bug in my logic.  I have the way that markers[] gets set work in a way
   that if I guess green and green is in the answer more than once I'll get
   two wMarkers rather than just one.  In the game of Mastermind you get one
   wMarker for each time you guess correct.  Thus in order to have two 
   wMarkers one would need to guess two greens and have there be two greens
   somewhere in the answer[].  I guess that will be my project for today.

   At least I'm making progress though, progress keeps me motivated to keep 
   working on this.  It is taking a lot longer than I expected and sometimes
   I wonder why I'm wasting my time on such a stupid game.  But I am learning
   a lot about program logic as it pertains to the goals of the project.

   UPDATE: Got the wMarker problem solved, it is probably a poor little hack
   but it is all I could think of.  Once I get better at programming I can
   go through and re-write the parts of this code that are kind of ugly.  But
   it works and right now that is all I care about.  :-)

11/09/2002
   Haven't written in here in a while even though I've made a couple of big
   steps.  I have gotten the interface mostly set up now in that it will take
   four user guesses and output the correct colored marks up on the screen.
   Next I have to use the Guess::showMarkers() function to output the colored
   markers for each set of four guesses.  After that is done I need to compare
   the guesses against the answers to find out when the person wins.  Should be
   done by the end of the week, maybe even today if I can do it fast enough. :-)

12/01/2002
   Well, the ncurses version is done in that the game plays all the way
   through without any problems.  I actually had it working a week or so ago
   but forgot to write it down in here so the date is lost forever.  :-(
   Anyway, now I am going through the code and cleaning and adding a few
   things I didn't do yet.  I want to make a "Top Scores" file and also
   print out how many tries it took to complete the game if you won.

   Well, I am off to start working on the problems, hopefully I'll make some
   progress tonight.  Oh, one more thing I'm going to look into is running
   srand() only once during execution of the game.  I was told that running
   it more than once will not get the maximum randomness out of the rand()
   algorithm.  So, I'm either going to have to write it into the UI code or
   try and figure out how to run it only once from the backend.  Let's see
   where I end up!

12/07/2002
   Adding new features today!  I have added and completed a "quit" option.
   If for some reason or another you need to quit the game gracefully while
   in the middle of a game you can type "quit" as a color choice and exit the
   game gracefully.  Working on an "undo" ability right now that will back up
   one guess and let you redo it if you want.  I decided this feature would be
   nice while playing the game a couple times and inputting a color then 
   after-the-fact finding a better guess.

12/20/2002
   Been busy with work and the like, haven't had much time to work on the game.
   However, today I had a little free time and changed a few things.  First off
   I set all the color displays to be in bold so that they are easier to 
   distinguish.  I also then made the cursor invisible when displaying the
   answers after you win/lose the game.  I was having a hard time seeing what
   color the last answer was with a bright white cursor sitting right next to
   it.

   My next addition which I have laid the ground work for is an "undo" feature.
   The plan is that if you put down a color then change your mind after you've
   already hit enter you can type "undo" and it'll erase the previous color
   and let you put in another one.  I might look at the official rules of the
   game to see if it is like chess where if you "take your hand off the piece"
   so to speak it is your move.

   Anyway, I will probably be putting this up on Freshmeat here pretty soon.
   Was going to do it earlier this week but ran into the problem that I 
   had registered an account a long time ago and cannot remember the password.
   That isn't so bad, but the e-mail address I registered with is long gone
   so I can't have them e-mail my password to me.  I think I'll try and get
   a hold of one of the admins and have them reset my password or something
   like that.

12/21/2002
   Making progress!  Setup a ruler between the left and middle panel so it is
   easier to keep track of how many turns you have left.  The game has come
   along nicely these past few days.  One major design alteration helped and
   that was making a struct of all the windows i needed.  This way I can access
   any of the windows a heck of a lot easier in the separate functions that
   need access to more than one window.  (Which is only one function right now
   but it is just all around easier with this setup.)

   --- UPDATE --- 12/01/2002 ---
   I did get srand() to run only once from the backend of the game.  Rather
   an easy hack but probably not the best looking.  I just setup a bool
   variable to keep track of wether or not it had been run before.  :-)

12/22/2002
   I seemed to have fixed a pretty big glich in the game.  What was happening
   (my wife caught this) is that the pegs that marked how many you got right
   wasn't always showing up correctly making it quite difficult to win the
   game.  Well after looking into the problem I think I found the culprit.
   A boolean variable wasn't getting set back to false after each iteration
   of a for loop that tests for the white markers.  In other words, "it-no-
   worky."  But, like I said I think I fixed it so now is the time for me
   to come up with a nifty name and post the game to Freshmeat.

01/08/2003
   Phew!  I haven't worked on this in a while because I've been so busy doing
   everything else under the sun.  Started working on a top score ability a
   while ago and that is my goal for tonight.  I've got it to start reading
   and printing the scores where I want.  My main problem is going to come
   from choosing a design for the score file and where to put the file.  If
   it is put in a global dir (ie /var/games/braincurses.scores) then you
   can have a little competition among others users (if there are other users
   on your box that is!  :-P )  Otherwise I'll just end up making it a dot
   file in the $HOME dir.

   UPDATE: Got the getScores() pretty much ironed out, I'm going to fiddle
   with it a little more here and there but it is functioning.  I started
   work on writeScores() and made some progress.  I will not ask the user
   for a name to put in the top score list.  Instead it will take the user
   name of the id that is calling the game process.  That way I have 
   somewhat of a control over the displaying of the top scores and how I
   write the top score file.  Since UNIX usernames cannot be over eight
   characters long I know that I can reserve that much space at a maximum
   and still be safe.

01/12/2003
   Been working on and off on getting a new release ready to go out.  I have
   revised the README so the rules make a little more sense.  Sorry for any
   of you that got irked because you couldn't figure how to input! :-(
   Hopefully the revised rules make more sense and you can play a little
   better now.

   The next release I'm putting out (soon I think) will not have the top score
   capability quite done.  But the way input is processed is done a little
   differently and hopefully for the better.

11/15/2003
   Well, it has been a LOOOONG time since I really did anything besides
   look at the code.  But I have made a few changes, mostly trivial,
   and added some updates from P. Peterson.  The main things that
   changed were the way wMarker was computed and command line parameter
   acceptance.

   Figured it was time for a new release just so people know the game
   isn't completely dead.  So, enjoy the few new features, and bug
   fixes, until I can finish the other things I've been working on.
   Next on the TODO list is to finish the top score and hopefully
   rewrite the way input is taken/validated to a more useful fashion.
