Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 25th, 2008, 4:50 PM   #51
Fall Back Son
Professional Programmer
 
Join Date: Oct 2006
Posts: 258
Rep Power: 2 Fall Back Son is on a distinguished road
Re: back to online battleship

I'm glad you got it working. I'm not sure what design you finally decided on, but what I had in mind for ActionRequest was that action request would simply contain two things, 'boolean hitSuccess' and 'coordinatesArray'. Whoever goes first would pass across an action request. Then player2 would check if it hit or not, update 'hitSuccess' appropriately, update the board appropriately, take his turn by guessing a square and updating coordinatesArray, then send it back. Then this process would be repeated. All you would need to do this is a couple of while loops, and a few things inside each while loop. To update the board you could call a updateBoard method (what I was calling eval earlier)
Fall Back Son is offline   Reply With Quote
Old May 25th, 2008, 4:53 PM   #52
Fall Back Son
Professional Programmer
 
Join Date: Oct 2006
Posts: 258
Rep Power: 2 Fall Back Son is on a distinguished road
Re: back to online battleship

Quote:
Originally Posted by cwl157 View Post
ok i upgraded it a lot since the last post, and i have the client and server talking to each other. Now i just need to figure out how to modify the ActionRequest to send back and forth so they know if its gonna be a move or end game. I just learned i can not set a variable inside the ActionRequest object to true or false, i need to modify the actual object. How do i do this?
I've run into this problem before also. I never figured out exactly why it happens but I think it has to do with Serialized objects. If you create a copy of the object the problem is fixed.
Fall Back Son is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get an email to fill out an online form? r2d246 C++ 2 Jan 16th, 2006 12:42 PM
I am back kurifu Coder's Corner Lounge 9 Oct 21st, 2005 4:31 AM
Eternity Online Lucid Project Ideas 4 May 12th, 2005 9:54 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:12 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC