Game-Test
#include<bits/stdc++.h> 
using namespace std;
int maxcnt = 20;
bool ok[129];
char opt;
string str;
string argforcl;
bool okstr, okopt, okcnt;
signed main(int argc, char* argv[]) {
    ok['n'] = ok['N'] = ok['y'] = ok['Y'] = ok['\n'] = 1;
    switch (argc) {
    case 4:
        okcnt = 1;
        maxcnt = atoi(argv[3]);
    case 3:
        okopt = 1;
        opt = argv[2][0];
        if (argv[2][1]) {
            string tmp;
            argforcl = argv[2] + 1;
            for(const auto ch : argforcl){
                if(ch == '/'){
                    tmp.push_back(' ');
                }
                tmp.push_back(ch);
            }
            argforcl = tmp;
        }
    case 2:
        okstr = 1;
        str = argv[1];
        if (str == "Help") {
            cout << "Help:\r\n\r\nusing: game-test [filename] [okopt][args?] [cnt]\r\n";
            return 0;
        }
    default:
        break;
    }
    if (!okstr) {
        system("dir");
        cout << "filename: ";
        cin >> str;
    }
    if (!okopt) {
        opt = cin.get();
        cout << "\r\n\r\nre build?[Yn]: ";
        cin.get(opt);
        while (!ok[opt]) cin.get(opt);
    }
    if (opt == 'N' || opt == 'n');
    else {
        if(!okopt){
            cin.get();
            cout << "\r\n\r\nargs for cl? ";
            getline(cin, argforcl);
        }
        system(("cl " + argforcl + ' ' + str + ".cpp").c_str());
    }
    if (!okcnt) {
        cout << "test cnt: ";
        cin >> maxcnt;
    }
    for (int i = 1; i <= maxcnt; ++i) {
        rename((to_string(i) + ".in").c_str(), (str + ".in").c_str());
        system(str.c_str());
        system(("fc " + str + ".out " + to_string(i) + ".out").c_str());
        rename((str + ".in").c_str(), (to_string(i) + ".in").c_str());
    }
}
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇