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...
Type: Posts; User: Maukkv
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...
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...
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...
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.
:)
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...
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...
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...
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;
.
.
....
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?
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...
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...
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;
...
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...
That's what I get from the cmd window.
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...
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...