lzlcrack.cpp

来自「“猜数字”游戏 C++ DOS程序,源码 含界面与游戏逻辑」· C++ 代码 · 共 34 行

CPP
34
字号
#include <iostream.h>
#include <bios.h>
#include <conio.h>
#include "keycode.hpp"
#include "csz.hpp"

void main(){
	char key;
	GuessNumbers game;
	int i,done=0;
	while(!done){
		game.CreatNumbers();
		if(!game.demo){
			game.hint("Guess and input. ESC to exit play.F1 for help.");
			game.Guess();
		}
		else{
			game.hint("           Press any key to next one.         ");
			game.DemoGuess();
		}
		game.ShowAnswer();
		if(game.demo)
			game.hint(" Any key to next demo. F3 to exit.F2 to play. ");
		else
			game.hint(" Any key to next game. F3 to exit.F2 to demo. ");
		key=bioskey(0)>>8;
		switch(key){
			case K_f3:done=1;break;
			case K_f2:game.demo=1-game.demo;break;
		}
	}
textmode(-1);
clrscr();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?