Solved

How to do this G@me

Posted on 2006-10-20
22
180 Views
Last Modified: 2010-03-31
http://members.sigecom.net/kseifert/WordLadders/solver.htm

First of all, is the above game difficult to do? will it take a lot time?

I intend to do similiar stuff but without the GUI

Thanks









0
Comment
Question by:babypink
  • 11
  • 10
22 Comments
 
LVL 14

Accepted Solution

by:
hoomanv earned 50 total points
ID: 17772804
Download the applet jar file from
http://members.sigecom.net/kseifert/WordLadders/WordLadders.jar
Use a java decompiler like JAD to see the source code of the applet
0
 

Author Comment

by:babypink
ID: 17772841
Downloaded JAD, but it only can decomplie .class file?
0
 
LVL 20

Expert Comment

by:Venabili
ID: 17772880
Get the class files out of the jar file... Jar is an archive...
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:babypink
ID: 17772908
How to do it?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17772917
Use an arcive manager like winzip winrar 7zip
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17772933
Or type in cmd: jar -xf WordLadders.jar
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17772954
Copy the below line in a batch file (i.e. jad.bat) near jad.exe
   jad.exe -sjava -ff -pv4 -noctor -nonlb -space -t -o *.class
Then place all classes which you've extracted from WordLadders.jar, near jad.bat
Now double click on jad.bat
0
 

Author Comment

by:babypink
ID: 17772980
Hi hoomanv

manage to do it, thanks
0
 

Author Comment

by:babypink
ID: 17780926
can i ask how to convert a word like "dog" to an integer?
0
 

Author Comment

by:babypink
ID: 17780967
Example given a string of
re
ti
to
uh
um
un
up
us
ut
we
wo
xi
xu
ya
yo
How to find the shortest path to get from "re" to "yo" changing 1 letter a time ?
so it it "re" -> "we" -> "wo" -> "yo"
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17781041
Perform a BFS (Breadth First Search)
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17781050
> "dog" to an integer
"dog".hashCode()
0
 

Author Comment

by:babypink
ID: 17782481
Hi hoomanv ,

how to code for Perform a BFS (Breadth First Search)?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783114
You should first learn it. Read the soloutions to problems that are solved by BFS.
Then in this game you start from a root node and expand it to every other leaf node that is reachable from root.
For example "to"
Will lead to "ti" and "wo" and "yo"
And for each new node you have to perform the same strategy until you reach the answer
BFS can be implemented by a Tree or Stack data structure
0
 

Author Comment

by:babypink
ID: 17783450
Any similiar code to reference from?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783463
0
 

Author Comment

by:babypink
ID: 17783570
hard to cant find something similiar to my problem.....
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783621
You might not found anything similar similar, you should first get the idea behind BFS, and then start coding the game yourself
0
 

Author Comment

by:babypink
ID: 17783847
Given
private static List<String> data = new LinkedList<String>();
private static List<String>container = new LinkedList<String>();

How to check if a String in "data" is contain in the "container"

how to code it?

0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783931
Iterate thru all elements of data and check
container.contains(element)
0
 

Author Comment

by:babypink
ID: 17786443
I can understand BFS in regard the nodes.....

But how to use it in my problem above?

Can explain in regard my example?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17889653
And the reason for C grade ?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iterator/ListIterator approach 17 55
Unhandled exception type Exception 18 52
JavaFX TableView not displaying correctly 3 109
junit example issue 2 28
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question