Back to BeeGuid Source

void firstMode()
{
    bool    repeatFirstMode = true,
            error = false;
    while (repeatFirstMode)                                                    //Body of First Mode
    {
        welcomeTitle();                                                        //New page
        filesTable();                                                        //Table of files
        string    beeName,
                beeFilePath;
        beeName = fastModeConf(1);
        if ((beeName == "res") | (beeName == "stop"))
        {
            if (beeName == "res") { res = true; }
            else { stop = true; }
        }
        beeFilePath = "Database\\BeesGeneticCards\\" + beeName + ".txt";    //Path to file needed
        ifstream in(beeFilePath);                                            //Opening file
        if (!in.is_open()) { ::cout << " Console: " << "File doesn't exist!\n"; }
        else                                                                //File opened successfully
        {
            welcomeTitle();                                                    //New page
            if (devMode == true)                                            //Dev Mode
            {
                ::cout << darkred << " DEV: " << darkblue << "Connecting to file: " << beeName << ".txt" << endl;
                cout << aqua;
                for (int i = 1; i <= 80; i++)
                {
                    cout << "\xC4";
                }
            }
            int biggestLengthOfGen = 0;
            for (int i = 1; i <= 23; i++)
            {
                char fileString[255];
                
                int abc = 0;
                in.getline(fileString, 255);
                abc = paramWriter(fileString, i);
                if (biggestLengthOfGen < abc) { biggestLengthOfGen = abc; }
            }
            if (biggestLengthOfGen < 13) { biggestLengthOfGen = 13; }
            genCardTable(biggestLengthOfGen);
        }
        in.close();                                                            //File closed
        if (fileCorrupt == true) { ::cout << " Console: Seems " << beeName << ".txt is not correct" << endl; }
        fileCorrupt = false;
        repeatFirstMode = restartMode(error, " Get another card? (y/n) ");    //Restart this mode
    }
}

Опрос

Оцените мой сайт
Всего ответов: 55

Статистика



Онлайн всего: 1
Гостей: 1
Пользователей: 0



Radio