@Override
    public void run()
    {
        int numberOfThreads = settings.getInt("threadCount");
        
        threads = new TestCaseThread[numberOfThreads];
        for(int i = 0; i <= numberOfThreads - 1; i++)
        {
            threads[i] = new TestCaseThread(i + 1, testCase.clone(), settings);
            threads[i].start();
        }
        
        if(settings.getBool("runToTarget"))
        {
            boolean stillRunning;

            while(run)
            {
                stillRunning = false;
                for(int i = 0; i <= numberOfThreads - 1; i++)
                {
                    if(threads[i].isRunning())
                    {
                        stillRunning = true;
                        break;
                    }
                }

                if(!stillRunning)
                {
                    for(int i = 0; i <= numberOfThreads - 1; i++)
                    {
                        int[] result = threads[i].getResults();
                        results[0] += result[0];
                        results[1] += result[1];
                        results[2] += result[2];
                    }
                    
                    if(settings.getBool("verbose"))
                    {
                        System.out.println("Simulation results: (" + results[0] + " : " + results[1] + " : " + (double) Math.round((double) results[2]/ (double) (results[0] + results[1]) * 100) / 100 + ")");
                    }
                    run = false;
                }
            }
        }
    }