Does it work for you?
And also highlight the code with the [code=java] tags next time.
Type: Posts; User: minju
Does it work for you?
And also highlight the code with the [code=java] tags next time.
What is your question?
You have braces{} but nothing before it, like if, while, for.
You have to put the boolean variable's name instead of "boolean".
You can't compare a declarator with something.
Hint: JFrame -> JPanel -> JTextArea -> append ^^
Which error do you get?
The problem in the if-statement is that it fails, when the cards are not in order.
e.g. AAAKK but not AAKAK
You could solve this problem by checking three cards with the same number first
and...
The problem is when you read the data into tokens[].
while (line !=null)
{
tokens= line.split(",");
System.out.println(line);
line = br.readLine();
}
'Tokens' can only contain data of...
[code]-tags? :)
Sure.
boolean run=true;
do{}
while(condition&&run);
You could check if there is a wall over the ghost.
If not, it will "random generate a number to choose which way to go".
So your problem is that when the ghost hits a wall with the speed of 5px the ghost moves into the wall 5px before it chooses another direction?
You could make a bool variable and set it as second condition to the do-while loop.
When you change the bool you stop the loop.
Put your code in [code] tags please.
Yeah as I mentioned you can create objects out of classes in the environment, but if you export the whole thing you need a main() method.
Sorry, my mistake.
You do need a main() method I remember.
But maybe clarky2006 is not aware of that because in BlueJ you have the availability to create an object out of a class without a main()...
@Norm
yes the jar differs from normal ones because it has package.bluej included
like if you have the classes test1, test2, test3 the jar will have
META-INF
test1.class
test2.class
test3.class...
In BlueJ you have no main() method.
In the environment you have different classes and at when you export it to jar, you can choose which class you want to be the main class.
The chosen main class...
can you describe your if problem a little more, please?