#include #include #include #include EFI_STATUS EFIAPI UefiMain ( IN EFI_HANDLEImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { UINTN Index; EFI_INPUT_KEY Key; CHAR16 *result = L"pinguin"; CHAR16 *state = L"_______"; UINTN Attempt = 0; do { Attempt++; SystemTable->ConOut->ClearScreen(SystemTable->ConOut); Print(L"Welcome to Hangman!\n"); Print(L"Attempt: %d\n\n\n", Attempt); // print found characters for(UINTN i=0; iBootServices->WaitForEvent(1, &SystemTable->ConIn->WaitForKey, &Index); SystemTable->ConIn->ReadKeyStroke(SystemTable->ConIn, &Key); // check if pressed key is in result for(UINTN i=0; iConOut->SetCursorPosition(SystemTable->ConOut, 0 , 4); for(UINTN i=0; iBootServices->WaitForEvent (1, &SystemTable->ConIn->WaitForKey, &Index); return EFI_SUCCESS; }