神牌乱斗场全版本

· · 休闲·娱乐

神牌乱斗场全版本,需要自取

01.作者的双路读写调试版(0.1版)

#include<bits/stdc++.h>
#include<windows.h>
#include<fstream>
using namespace std;
string username;
map<string,bool> mp;
int users;
struct pig
{
    string name;
}user[10001];
void C(int x,bool lig)
{
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x|(lig<<3));    
}
void getuser()
{
    string names;
    //ifstream inputFile("账号信息.txt");
    ofstream out("账号信息.txt");
    out<<"SB"<<'\n';
    out.close();
}
void Homepage()
{
    C(3,1);
    cout<<setw(63)<<"神牌乱斗场\n";
    C(7,1);
    cout<<"选择选项:\n";
    C(5,1);
    cout<<"A.账号注册\n";
    C(2,1);
    cout<<"B.账号信息\n";
    C(4,1);
    cout<<"C.游戏规则\n";
    C(6,1);
    cout<<"D.开始游戏\n";
    C(1,1);
    cout<<"E.作者的话\n";
    C(7,1);
    cout<<"温馨提示:游戏中的选项无需完全准确的输入,判断条件为对应键的物理状态,对大小写不敏感(>u<)";
    system("pause");
    if(GetAsyncKeyState(0x41))
    {
        //update();
        system("cls");
        getuser();
        C(7,1);
        cout<<"用户注册(Register):\n";
        cout<<"用户名:";
        cin>>username;
        while(mp[username])
        {
            system("cls");
            C(4,1);
            cout<<"该用户名已被注册!\n";
            C(7,1);
            cout<<"用户注册(Register):\n";
            cout<<"用户名:";
            cin>>username;
        }
    }
}
int main()
{
    while(1)
    {
        system("cls");
        Homepage();
    }
}