基于dev-c++编写益智类游戏
下载并安装dev-c++:
下载地址:https://bloodshed-dev-c.en.softonic.com/
游戏源码:
#include
#include <stdlib.h>
#include <time.h>
using namespace std;
void Start();
void GetResults();
int i, j, life, maxrand;
char c;
void Start() {
i = 0;
j = 0;
life = 0;
maxrand = 6;
cout << "Select difficulty mode:\n"; // the user has to select a difficutly level
cout << "1 : Easy (0-15)\n";
cout << "2 : Medium (0-30)\n";
cout << "3 : Difficult (0-50)\n";
cout << "or type another key to quit\n";
c = 30;
cin >> c; // read the user's choice
cout << "\n";
void GetResults() {
if (life <= 0) { // if player has no