Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a Word ladder VB . NET prograem Description A word ladder is a game / puzzle where the user is given a word and
write a Word ladder VBNET prograem
Description
A word ladder is a gamepuzzle where the user is given a word and has to make a new word by changing exactly one letter, repeating this process to make more words. Some versions of the game have a starting word, a target word, and a number of tries eg CAT to DOG in three changes could be CAT COT DOT DOG This version will give the player a random word, selected from a list, and see how long a chain of words they can get without repeating.
Example output:
Make a new word by changing only one letter:
The current word is BIRD
BARD
The current word is BARD
HARD
The current word is HARD
HARP
The current word is HARP
CART
You changed two letters, game over.
Your score is
Part : Setup
Create a listarray of letter words loaded from a file or copied from the list in this document and output a random word from the list as the current word.
Hint: save the file in U: words IOFile.ReadAllLinesU:wordsletters.txtToList
Part : New word
Have the user enter a new word. If the word is not exactly four letters long or the word differs by more than one letter, the game ends, otherwise the game continues and the user's score increases by one. If the game has not ended, the current word is set to the user's new word ready for the next turn.
Hint: check pairs of letters in the previous and new word and count how many letters ae the samedifferent if oldwordi newwordi then... Repetition & valid words
Have the game end if the user gives a word that is not in the list or they repeat a word they have already used. At the end of the game, tell the user their score.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started