Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem app epson mbed msp430 pl tests
hangman.cpp
00001 00002 00003 #include "log.h" 00004 00005 #include "hangman.h" 00006 00007 namespace Flexbook 00008 { 00009 00010 HangmanGame::HangmanGame() 00011 : finished(false), word(""), guessed(""), 00012 wordlength(0), currentpos(), oldpos(), 00013 alphabet(), hangstage() 00014 { 00015 Log("Creating hangman game"); 00016 // Display the game welcome screen 00017 for (int i=0; i<27; i++) 00018 { 00019 alphabet[i]=false; 00020 } 00021 currentpos=13; 00022 oldpos=13; 00023 hangstage=0; 00024 wordlength = ReturnWord(*word); 00025 for (int i=0; i<wordlength; i++) 00026 { 00027 guessed[i]=13; 00028 } 00029 // Display the game start screen 00030 } 00031 00032 void HangmanGame::RedrawAlphabet(char newpos, char oldpos) 00033 { 00034 // redraw the alphabet matrix based on a cursor move 00035 } 00036 00037 }
Generated on Tue Jul 12 2022 21:14:34 by
