![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#51 |
|
Professional Programmer
Join Date: Oct 2006
Posts: 258
Rep Power: 2
![]() |
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)
|
|
|
|
|
|
#52 | |
|
Professional Programmer
Join Date: Oct 2006
Posts: 258
Rep Power: 2
![]() |
Re: back to online battleship
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |