Question
Ghost is a two-player game. The goal is to implement an interactive Python program that allows two humans to play the game against each other.
Ghost is a two-player game.
The goal is to implement an interactive Python program that allows two humans to play the game against each other. If you are unfamiliar with this game, take a moment to query Google or Wikipedia. The remaining topics to accomplish this objective include the game rules, where to start, and the program expectations.
Game Rules
Players take turns contributing a letter to a word fragment when playing the game. The player loses if they create a real word unless the word is less than four letters. Another method of losing is to create a fragment that ensures no words can be made (i.e., qz, there are no valid words where these two letters are contiguous). Getting Started Use the skeleton file program_6_part_2.py. As stated earlier, this game also requires the word list file. Like the Scrabble project, run the skeleton before making other changes. Like the Scrabble game, the output of this file before any modifications will look like the output shown in Figure 2. If there are errors when you run the unmodified skeleton file, use the troubleshooting tips provided in the Getting Started section of these instructions for the Scrabble game. 7
Requirements
There are a few additional requirements. The game must be interactive. Each turn should clearly indicate the player responsible for the following letter and provide the word fragment at that point. Additionally, in each turn, the program will ask the player to enter their next letter. The program validates the entry. If the entry is a character and doesnt cause the player to lose, this letter is added to the substring. The game ends if a word is formed that is longer than three letters or if it is no longer feasible to create a word from the word fragment. All code should be within functions. (No lose code.) After you have thoroughly tested your code, comment out any code used in testing. Like any use of strings in programming, pay attention to the casing. If its possible to ensure all strings are in the same case, its probably a good idea to handle strings that way
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