Search:

Type: Posts; User: 19xx62xx14

Search: Search took 0.10 seconds.

  1. Replies
    2
    Views
    557

    Re: File don't work

    Thank you it did work, also my split argument was wrong so now everything is working good :)
  2. Replies
    2
    Views
    557

    File don't work

    I have problem making my file work. Wrong message in console is "Index out of bounds" or "Index 1 out of bounds for length 1". How do I solve it?




    /**
    * Class for reading capitals from file...
  3. Replies
    0
    Views
    1,163

    How to implement AI player to my game

    Hello! I have made a ping pong game and want to add a AI player to it. How do I start and find information about this?[code=Java] [code=Java]
  4. Replies
    1
    Views
    637

    Promblem with JUnit testing

    Hello! I been trying to learn JUnit testning but I have problems with how to do it. Does anyone have time to do it and explain? This is a void method so it does not return anything so how do I test...
  5. Thread: Game

    by 19xx62xx14
    Replies
    3
    Views
    502

    Re: Game

    Player player = null;//this variable contains the loaded player.
    Player player2 = null;
    List<Player> listPlayer=new ArrayList<>(); // NY

    switch (startMenu.getString()) {
    ...
  6. Thread: Game

    by 19xx62xx14
    Replies
    3
    Views
    502

    Game

    Hello! I have done a hangman game and now I need to implement that 2 players can play. I have a class for one player and methods for how to make one player. But if i need to add another player how do...
  7. Replies
    8
    Views
    603

    Re: How to open the lock?

    So thank you it worked much better now. But now the problem is that the user need to type in 2 times to get the code work. I want the method combo() to save input so that I can use it again in open()...
  8. Replies
    8
    Views
    603

    Re: How to open the lock?

    To open the lock the user need to type right left right and it should pop up a message that the lock is opened and thats the problem. Even if input is right left right the message dont pop up. It...
  9. Replies
    8
    Views
    603

    Re: How to open the lock?

    1) Choose combo
    2) Reset
    3) Try to open the lock
    4) Finish
    1
    The lock has a three combo code. First right or left?
    right
    Second. Do you want to turn right or left?
    left
    Third. Do you want...
  10. Replies
    8
    Views
    603

    Re: How to open the lock?

    Its a logical problem so it does not pop up anything in the console. I have put some comments in my code, I also think it has something to do with the user input and scanner but I tried different...
  11. Replies
    8
    Views
    603

    How to open the lock?

    import java.util.Scanner;

    public class Chapter8{

    // user need to find the combo to open the lock
    // the right combo is first right, left and then right

    Scanner userInput = new...
Results 1 to 11 of 11