PDA

View Full Version : Setup a simplified battleship board... only 2 kind of ships



jpcancio
Nov 26th, 2005, 07:03 PM
Hi,

I've been working around a project but I've stucked on rotation of the ships and the surrounding of them.

What I need is to setup a 11x11 board in Javascript and to put in it 6 ships:

3 ships like this:

XXX

and

3 ships like this:

X
XXXX

The rules are that it can't be overlapped ships or side by side.
They can be in any position.


Can someone help?


Thanks.

windumi
Dec 7th, 2005, 10:32 AM
why not use DIV and define the absolute position?