Solved

How to do this G@me

Posted on 2006-10-20
22
179 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ArrayIndexOutOfBoundException 9 80
starter POM and spring-boot-starter,  spring-boot-web 2 53
eclipse argument 14 60
Running JavaFX on JDeveloper 12C 1 31
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

815 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now