Search:

Type: Posts; User: Maukkv

Search: Search took 0.07 seconds.

  1. Replies
    4
    Views
    1,291

    Re: Making a sprite jump

    I moved it to a method that already controlled the automatically scrolling background which I have already managed to get working. I just wanted to see if I could get the sprite to move and up and...
  2. Replies
    4
    Views
    1,291

    Re: Making a sprite jump

    Ok I've read the tutorial I still don't understand why the painting isn't working.
    The problem seems to be due to the code being executed in the keyPressed method? I tried taking the code out of...
  3. Replies
    4
    Views
    1,291

    Making a sprite jump

    I am aware that this has probably been posed and solved many times before however I've been unable to find any concrete help after a quick search. I am currently making a platformer game which...
  4. Replies
    7
    Views
    1,093

    Re: Noughts and Crosses/Tic Tac Toe code problem

    Ah Excellent! It works as planned. Thanks guys! I didn't realise that in that instance the isComplete() method was setting the value of each entry back to zero each time.
    :)
  5. Replies
    7
    Views
    1,093

    Re: Noughts and Crosses/Tic Tac Toe code problem

    Okay thanks again.
    I am actually having problems getting the game to work now when I make a move.
    When I try to input rows and columns in order to activate the makeMove() method nothing happens and...
  6. Replies
    7
    Views
    1,093

    Re: Noughts and Crosses/Tic Tac Toe code problem

    Ah of course, that was silly of me. Thanks!
    I now just have the problem with board.isComplete() = false.
    It states "unexpected type, required variable, found value" but I'm not sure what it refers...
  7. Replies
    7
    Views
    1,093

    Noughts and Crosses/Tic Tac Toe code problem

    I'm trying to create a noughts and crosses game, that runs without the need for any GUI components, with the following code. (I've marked in bold where the errors occur)

    (Some pointers: I've used...
  8. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    I've narrowed it down to the while section in my code I've tried implementing a count system so that it acts while the count is below a certain number.



    public static int count = 1;
    .
    .
    ....
  9. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    When I try to run it in Netbeans, it just seems to run forever, I left it going for over 20 mins and it didn't complete the running process?
  10. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    I've changed my code quite substantially, and now I have seem to have got a working bit of code, however now when I run it in the command window I get the following error which I can't seem to make...
  11. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    I'm not sure how I can solve the problem I now have, I've tried replacing the left and right in the insert method with Node.left/Node.right but I now get an error saying that they can't be referenced...
  12. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    Okay I understand what you're saying, I currently have this code:


    public class BinarySearchTree {


    public static class Node {
    private int value;
    private Node right;
    ...
  13. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    Okay right, I understand that more clearly now. I also see the problem with the node class interfering with insert. However when I define the Node class as an inner class it looks like the fields...
  14. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    That's what I get from the cmd window.
  15. Replies
    17
    Views
    2,945

    Re: Binary Search Tree inorder tree traversal

    I have tried writing this:


    public static void main(final String[] args){
    int[] anArray = { 7, 3, 1, 6, 9, 0, 4, 5, 2, 8};
    value = anArray[0];
    Node firstnode = new...
  16. Replies
    17
    Views
    2,945

    Binary Search Tree inorder tree traversal

    Hi I'm very new to Java and I'm trying to write some code to create a Binary Search Tree with the goal of outputting a list of integers using the inorder tree traversal method.
    I've got as far as...
Results 1 to 16 of 16