Answered step by step
Verified Expert Solution
Link Copied!

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 VB.NET prograem
Description
A word ladder is a game/puzzle 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 (e.g. 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 3
Part 1: Setup
Create a list/array of 4-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 = IO.File.ReadAllLines("U:/words4letters.txt").ToList()
Part 2: 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 same/different (if oldword(i)= newword(i) 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

Which team solution is more likely to be pursued and why?

Answered: 1 week ago

Question

Did the team members feel that their work mattered

Answered: 1 week ago