Message 52/1540 From Anthony J Gabrielson Dec 05, 06 09:23:21 AM -0500 Subject: Final Project: Networking Hello all, I spent a few moments getting the networking code to build with a c++ compiler. I resolved a few issues as can only be caught with a c++ compiler. Anyway I started a new directory in the repository, networkingcpp. All the code I worked on is in that directory. This code will need to be enhanced so it can integrate into the rest of the project. This code has been tested on Mercury, as well as other linux machines. Thanks, Anthony ------------------------------------------ On 12/5/06, Keith Bagley wrote: > > > > Very cool. > I've updated the Networking package of the model to reflect the latest. I > noticed that Elie Lalo and Rob Herrick had basically common stuff duplicated > in the Server and Client (with Server having more functionality), so I > baselined the structural model on the Server stuff I found. As with your > code Anthony, since this is C, I'm visualizing related functionality as > encapsulated wrappers and let the tool specify a UML <> dependency > relationship on the C-struct data elements. > > Finally, I'm having trouble connecting to the CVS repository nitin set up > -- any tips? Until then, the most recent version of the model is in my > models directory... > > Keith ------------------------------------------ Message 46/1540 From Anthony J Gabrielson Dec 05, 06 12:14:56 PM -0500 Subject: Re: Final Project: Networking I set CVSROOT to /usr/proj3/case/06f522/nsonawan/projectCVS in my .bashrc file. I created a directory FinalProject and from just outside it I ran cvs checkout FinalProject Anthony ------------------------------------- Message 34/1540 From Alison Miles Dec 06, 06 08:46:24 AM -0800 Subject: Re: 91.522 - Assignment #3 report To: Chris Guffey , Bob Lechner Cc: I am working on mine too, along with some code commenting. I will e-mail you the location of my writeup and final code ASAP (probably tonight). -Alison --- Chris Guffey wrote: > I've compiled my assignment #3 report on the work I > did and uploaded it here: > > $CASE/06f522/cguffey/asgnt3/assignment3_report.txt > > Prof. Lechner & Anthony: > Please let me know if you require more information. > ----------------------------------------------- Message 33/1540 From Anthony J Gabrielson Dec 06, 06 11:55:45 AM -0500 To: Bob Lechner Subject: VMWare Image Hello, Chris and I have been discussing VMWare alot this morning, and I think it would be beneficial if the CS dept could put an image configured similiarly to Mercury together for the students. I think this would encourage much more Linux use by students that may not have the experience and/or the funds to dedicate a stand alone computer. I think an image configured similar to mercury would be a good first step to encouraging more students to try and get familiar with Linux and other UNIXies. Do you think this is something the CS deptartment would be interested in putting together for is students? What do you think? Anthony ------------------------------------------------ --------------------------------------- Message 29/1540 From Chris Guffey Dec 06, 06 01:13:49 PM -0500 To: "Keith Bagley" Subject: Re: Final Project: Networking I checked in new revisions for setgame./cpp and cardgame.h/cpp. Besides the CVS check in, I also put the updates in my $CASE/06f522/cguffey/final_project/rev9 directory. This revisions adds functionality to check the number of sets on the board. Anthony, I tested it on my machine by adding the following code to the very bottom of function setupGame() in ProjectGUI.cpp and it seemed to work. I did not check in ProjectGUI.cpp because I know there's other places where we deal cards to the board and didn't want to break your code. The code below guarantees that the first board shown will have at least 3 sets on it. while (dealer.CountNumberOfHandsOnBoard(&board) < 3) { board.ClearBoard(); dealer.FillEmptyBoardSlots(&board); } --------------------------------------------------- Message 25/1540 From Anthony J Gabrielson Dec 06, 06 01:51:10 PM -0500 To: Chris Guffey Subject: Re: Final Project: Networking Chris, Wouldn't it be cleanier to put that right in the dealer before the cards are dealt? I'm thinking once networking is added in we are not going to want this in the GUI. My view is that the GUI should be doing as little house keeping as possible. If we do have the GUI doing housekeeping I think the networking code is going to have to be alot more complicated. For that reason I am hestant to integrate this change. Just my opinion - Anthony ------------------------------------------------------ Message 24/1540 From Chris Guffey Dec 06, 06 02:10:15 PM -0500 To: "Anthony J Gabrielson" Subject: Re: Final Project: Networking Well ideally, the networking code would never have to interact directly with the engine code right? or even the main code (GUI code)? I was envisioning that there'd be some kind of interface between the networking code and the main code (so they don't have to interact directly, that way changes to either end won't effect the other, only the interface) and then the GUI code would tell the engine what needs to be done? One thing I think we can improve, if I'm seeing this correctly, in the GUI code we have multiple places where we tell the dealer to deal cards. We could probably condense that into one place and that may help simply this (it may not though). I didn't have the dealer object do this automatically because the behavior is specific to set, not all card games will want to replicate this behavior. It's a good discussion though and I'm open to ideas. I'm not familiar with the networking though but as I said above I was under the impression the networking code would not touch any of the engine code. networking responsibilities: - connect all clients and server together - relay messages engine responsiblities: - maintain game objects - check for sets - shuffle and deal cards main code: - process network messages like update score, update screen, check for a set - keep track of who's playing and thier scores - draw screen ------------------------------------------------ Message 22/1540 From Anthony J Gabrielson Dec 06, 06 03:05:00 PM -0500 To: Chris Guffey Subject: Re: Final Project: Networking The Server needs to keep track of a few things: 1) The deck that has been dealt. 2) The score of every player. When the score or the deck changes the server needs to distribute that information to all of the clients. Also the server will be doing the verification of sets. So the dealer won't even be executed when networking is enabled. The point of the standalone was more for core functionality checkout than end of project functionality. Thats how I was envisioning the project. Do people think that makes sense? Anthony -------------------------------------------