Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    The function InitGame of playHangman.Lecture 1 - slide 3 : 22
Program 6
void initGame (char playerName[], hangmanGameState *state){
  strcpy(state->playerName, playerName); 
  state->numberOfWrongGuesses = 0;
  state->numberOfCorrectGuesses = 0;
  int i;
  for (i=0; i < 128; i++){
    if (isalpha(i)) 
      state->charGuessed[i] = 0;
    else 
      state->charGuessed[i] = 1;
  }
  initHighscoreFacility("highscorefile");
  clrconsole();
}