Search:

Type: Posts; User: Alucard2487

Search: Search took 0.08 seconds.

  1. Replies
    15
    Views
    1,454

    Re: ConnectFour

    My apologies:

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    at proj2.ConnectFour.checkVertical(ConnectFour.java:159)
    at...
  2. Replies
    15
    Views
    1,454

    Re: ConnectFour

    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...
  3. Replies
    15
    Views
    1,454

    Re: ConnectFour

    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.
  4. Replies
    15
    Views
    1,454

    Re: ConnectFour

    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...
  5. Replies
    15
    Views
    1,454

    Re: ConnectFour

    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...
  6. Replies
    15
    Views
    1,454

    Re: ConnectFour

    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...
  7. Replies
    15
    Views
    1,454

    Re: ConnectFour

    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...
  8. Replies
    15
    Views
    1,454

    ConnectFour

    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....
Results 1 to 8 of 8