My apologies:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
at proj2.ConnectFour.checkVertical(ConnectFour.java:159)
at...
Type: Posts; User: Alucard2487
My apologies:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
at proj2.ConnectFour.checkVertical(ConnectFour.java:159)
at...
So....I hit another snag. I'm trying to come up with conditions on wining in all 3 directions. I know I need a separate method for each, but what I have isn't working. I'm getting an out of bounds...
Yes. I have also managed to get a toString method to print out the board. All I need to do now is figuring out how to do the win conditions and properly displaying the players pieces on the board.
So, I think I fixed the problem. I copied that for loop and put it in a setter method. That fixed the out of bounds problem. As, of now I'm working on a toString method to display the state of the...
I get this error.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at proj2.ConnectFour.<init>(ConnectFour.java:27)
at proj2.Project2.main(Project2.java:36)
I know I need...
A T.A pointed out that I have a problem with my for loop in my turn method in the ConnectFour Class. I keep getting an out of bounds error and he thinks that this may be the case as I have no way of...
My fault. The users are prompt to input their names and then they are asked to input the size of the board that they want to play on. However, the board must have at least 25 spaces. So you can have...
We have to make a ConnectFour game in java for a project. I think I have managed to code most of it properly (Let me know if this is wrong). I''m having trouble figuering out how to decide who wins....