Added HangmanGame class, but does not work yet

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

hangman.cpp

Committer:
markpsymonds
Date:
2017-12-04
Revision:
1:a5ec6f9dcf0d
Parent:
0:fa7450a43b99

File content as of revision 1:a5ec6f9dcf0d:



#include "log.h"

#include "hangman.h"

namespace Flexbook
{

HangmanGame::HangmanGame()
: finished(false), word(""), guessed(""),
  wordlength(0), currentpos(), oldpos(),
  alphabet(), hangstage()
{
    Log("Creating hangman game");
    // Display the game welcome screen
    for (int i=0; i<27; i++)
    {
        alphabet[i]=false;
        }
    currentpos=13;
    oldpos=13;
    hangstage=0;
    wordlength = ReturnWord(*word);
    for (int i=0; i<wordlength; i++)
    {
        guessed[i]=13;
        }
    // Display the game start screen
}

void HangmanGame::RedrawAlphabet(char newpos, char oldpos)
{
        // redraw the alphabet matrix based on a cursor move
}

}