Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

C++ scramble word game

xiaomengxi
xiaomengxi 


complete the task to fullfill all the requirements of assignment 1 and the addtional features from addtional assignment 1,do some cppunit test and code coverage test. To develop a scramble word game application that contains an array of preset words. The game should randomly select a word and scramble its letters (see below). The first letter is extracted and placed back in the string at a random location. This process is repeated 20 times to ensure that the string is sufficiently scrambled. The game will start by sending a scrambled word to player to guess the right word. The player upon seeing the scrambled word can start guessing the correct word by submitting words for verification and tracking. If the player submits the wrong word, the game application will prompt the player to try and guess the correct word again. Upon player guessed the correct word before the count down time expires. The player will win the game. The game application will also display the congratulatory message, record the player timing and then either continue the next guess or end the game. Attachments Tags Clarifications

Answers

Scramble Game C++

SW_wizard
SW_wizard 



Implemented the scramble game as discussed Attachments
scramblegame.zip (5 K) Download



Preview
switch(option){ case 1: { string newword; cout << "Enter a word to be added: "; cin >> newword; char *newwordPtr = new char[newword.size()]; strcpy(newwordPtr, newword.c_str()); game.encryptWord(newwordPtr); break; } case 2: { cout << "Enter word to be

Preview
or not cout << "You have " << CounDownVal << "sec to guess" << endl; do { string guessWord; cout << "Enter Guess: "; cin >> guessWord; int guessLen = guessWord.size(); user_input = new char[guessLen]; strcpy(user_input, guessWord.c_str()); ++numOfAttempts;

Preview
//cout << "count down has started"<<endl; } int Timer::getElapsedTime(){ unsigned int endTime = clock(); unsigned int elapsedTime = endTime - startTime; unsigned int elapsedTimeSec=(elapsedTime/(CLOCKS_PER_SEC)); //cout << "time elapsed since start= "<<

Preview
road

Screenshots
Purchase Answer