[Kde-games-devel] Two questions about kbattleship

Nathan Humbert humbna at mirage.aswwc.net
Sat Aug 2 21:02:23 CEST 2003


On Friday 01 August 2003 06:41 pm, Henry W. Miller wrote:
> On Sat, 2 Aug 2003, Albert 'TSDgeos' Astals Cid wrote:
> > At 00:22 02/08/2003 +0200, you wrote:
> > >Don't the programs exchange ship positions on game start?
> >
> > I've looked at the code and i'm almost sure they don't, each time you
> > click on a map position the client sends a message asking if it has water
> > or a ship and the other player answers. It is better that way, because if
> > the ships positions were exchanged at game start you could use tcpdump or
> > a similar utility and cheat the game.
>
> Of course now you can write a client that won't place ships until you tell
> it to, or there is now only one possible way for the ships to be placed
> given the shots already taken.
>

Create an algorithem that will generate a string from the positions of the 
peices, run the string through MD5, send the hash to the other client, start 
the game. 
At the end of the game send the positions of all the ships, run the algorithem 
put it through MD5 and see if the hash from the begining of the game matches 
the one at the end... 

Just an idea...

> Eliminating cheating isn't an easy problem.  If it was there wouldn't be
> any cheating.   For that matter if it was easy I'd post the soilution
> instead of pointing out one potential way to cheat.
>
> (I'm not an expert on the code, but from a quick read I would say that
> someone could write a cheat that worked this way)
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-games-devel



More information about the kde-games-devel mailing list