Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need Help for C++ Programming. I need to create an OOP programming. This is prog

ID: 3777591 • Letter: N

Question

Need Help for C++ Programming.

I need to create an OOP programming. This is programming requirement: class GhostGame.

The game of GHOST is a Word game Example of Play Player 1 picks a letter.

Player 2 picks a 2nd letter, which must be a 2nd letter of an actual word, but not yet a full word.

Next player picks the 3rd letter, which must be a 3rd letter of an actual word, but not yet a full word.

To lose, you are forced to pick a letter the will spell a complete word.

To stay in the game or win, you add a letter that will not yet spell a complete word.

The letter sequence MUST lead to the spelling of an actual word. 2 to 4 player (no computer player) – Prompt the user for number of players. Validate.

Requirements: Find an English word list online (minimum of 100,000 words) and upload the list into an appropriate data structure.

During the play, have the user letter sequence verified; it must lead to an actual word. If not, then inform the player to try again.

Keep track of each player’s number of incorrect letter selections.

Who wins/looses?

A Player who is forced to spell a complete word is last place

Other players are ranked by the number of non word letters they tried... the fewer the better.

Use the appropriate data structures to create this game. Hint: A Trie Tree and others.... Use lower case letters for words. To play the game Int main() { GhostGame G; G.Play(); } What to hand in A description of your program and its features. A description of your program's command-line syntax. A description of the main data structures your program uses. A discussion of the current status of your program, what works and what doesn't, etc. Your program's source code. Your plan that you used to write your code (See below) Screen prints of the successful execution of your code. Constraints This project will require you to implement one or more data structures. Either use the STL or write your own classes, it is up to you.

Note: Vector is not allowed to be used in this question.

Thanks!

Explanation / Answer

#include #include void run(); void printMap(); void initMap(); void move(int dx, int dy); void update(); void changeDirection(char key); void clearScreen(); void generateFood(); char getMapValue(int value); // Map dimensions const int mapwidth = 20; const int mapheight = 20; const int size = mapwidth * mapheight; // The tile values for the map int map[size]; // Snake head details int headxpos; int headypos; int direction; // Amount of food the snake has (How long the body is) int food = 3; // Determine if game is running bool running; int main() { run(); return 0; } // Main game function void run() { // Initialize the map initMap(); running = true; while (running) { // If a key is pressed if (kbhit()) { // Change to direction determined by key pressed changeDirection(getch()); } // Upate the map update(); // Clear the screen clearScreen(); // Print the map printMap(); // wait 0.5 seconds _sleep(500); } // Print out game over text std::cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote