PDA

View Full Version : help with java!!!!



Impreza
10-15-2003, 10:10 PM
can anyone help me with some java?
i have a method and i want to make it into a loop, can anyone give me a hand?
thanks!
private void scanBoard ()
{
private int numofCritters = 0;

for (r = 1; r < 9; r++)
{
for (c = 1; c< 9; c++)
{
if (previous[r-1][c-1] == '*')
{
numofCritters++;
}
if (previous[r][c-1] == '*')
{
numofCritters++;
}
if (previous[r+1][c-1] == '*')
{
numofCritters++;
}
if (previous[r-1][c] == '*')
{
numofCritters++;
}
if (previous[r+1][c] == '*')
{
numofCritters++;
}
if (previous[r-1][c+1] == '*')
{
numofCritters++;
}
if (previous[r][c+1] == '*')
{
numofCritters++;
}
if (previous[r+1][c+1] == '*')
{
numofCritters++;
}

max_boost
10-18-2003, 02:28 PM
PM Spyderman cause he's a computer nerd

Impreza
10-18-2003, 03:30 PM
thx max_boost, but i already submitted my assignment, thx anyways!

roopi
10-20-2003, 12:49 PM
i hate programming. :thumbsdow

maybe i shouldn't have went into software development then. :banghead:

bart
10-31-2003, 11:32 PM
java is gay. php is where its at.

roopi
11-04-2003, 09:16 AM
Originally posted by bart
java is gay. php is where its at.


:rofl:

i think java has a little more to it than php.

WhiteNikes
11-04-2003, 11:55 AM
Originally posted by roopi



:rofl:

i think java has a little more to it than php.


Bah... you're not progamming until you've got pointers.
It's all about C.:D :D :D