I need help with my Connect Four java game.

naruto1988

Golden Member
Jun 27, 2004
1,028
0
0
it's a simple game played at the command line. the game engine is a two-dimensional array. here's a screenshot.

the two-player portion of the game works fine, but i'm having trouble building my AI. my bestMove method consists of 4 smaller methods. i'm working on the easiest of the small methods. its function is: if a row is empty except for two consecutive cells, block the opponent from getting three in a row.

here is the full code. and here's the portion i need help with: