llaspina 19 Light Poster Team Colleague

Since you have not done this type of problem before, start by doing the problem. By that I mean, play the game. Get some black and white chips or poker chips or cards. Line them up and play the game. Or work out examples on paper like you did in your post. Create enoguh examples that you understand the algorithm and you can either solve the puzzle or declare it unsolvable.

Once you can solve the probme by hand, try to converty the algorithm you discovered into code in the language of your choice.

This puzzle may be famous, but I have not heard of it. It looks like a simpler version of the 15 puzzle (which is very famous). You might learn something by researching the 15 puzzle since this seems like a one-dimensional variation.

llaspina 19 Light Poster Team Colleague

I'm not sure what you are looking for with ANT and the command line. What is your goal? What are you trying to accomplish?

I use ANT for a few minor things, like uploading files via FTP, signing jar files, and copying some files from the build directory to another place for deployment. I put these tasks together with ANT so that afer building my application, I can quickly sign my application and then upload it to the site my customers run it from using JNLP. I never bothered editing build.xml; that's why I use an IDE. So netbeans uses ANT to handle the build process and I use netbeans so I can focus on writing my program. If you want to play with ANT, the Apache reference might be a good place to start.

You can run a java program from the command line with the commmand java [program name] followed by any parameters you want to pass to the main method. Your IDE (Eclipse for you, Netbeans for me) runs this command for you and you can configure any command line parameters in the run properties. Are you trying to create a command line (console application) of some kind?

llaspina 19 Light Poster Team Colleague

Shouldn't the shuffle method take only a few miliseconds to run, if that? Swingworker is for tasks that take so long to execute that they will make the UI unresponsive. So if your shuffle method takes a second or two to run then it should definetly be on another thread. But unless your shuffle method is actually displaying an animation of the cards gettings shuffled or you have some unusual game that is played with a deck of 25,000 cards, I don't see why a shuffle would take so long.