///Licensed under Creative Commons Attribution 4.0 License, Written by Clemens Winter and Vladislav Nachev
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;


namespace Exploitation
{
    static class Program
    {

        [STAThread]
        static void Main()
        {
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            CreateBats.decisionFactory = DecisionFactory;
            CreateBats.memoryFactory = MemoryFactory;
            Exploitation.Start();
     
        }

        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            Exception ex = e.Exception;
            Debug.WriteLine(ex.Message);
            Debug.WriteLine(ex.StackTrace);
        }

        static Decision DecisionFactory(int decisionType, Memory memory)
        {    
            return new DecisionRules(decisionType, memory);
        }
        
        static Memory MemoryFactory(int memoryType, Perception perception, Physiology physiology, Ressource[] ressources)
        {

            return new EvaluationFamilies(memoryType, perception, physiology, ressources);
        }


    }
}
