aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.cpp
blob: db84ac47a678f2388a8075c6593a5df630340ae7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <QCoreApplication>


#include <QStringList>
#include "diceparser.h"

int main(int argc, char *argv[])
{
    // QCoreApplication a(argc, argv);
    DiceParser* myParser = new DiceParser();

    QStringList commands;

    commands << "3D100"
             << "3D100"
             << "10D10e[>=6]s"
             << "100190D6666666s"
             << "10D10e10s"
             << "10D10s"
             << "15D10e10c[8-10]"
             << "15D10c[>7]"
             << "1D8+2D6+7"
             << "D25"
             << "8+8+8"
             << "1D20-88"
             << "100*1D20*2D6"
             << "100/28*3"
             << "100/8"
             << "100*3*8"
             << "100*3*8";



    foreach(QString cmd, commands)
    {
        if(myParser->parseLine(cmd))
        {
            myParser->Start();
            myParser->displayResult();
        }
    }

    //return a.exec();
    return 0;
}