Пример #1
0
        //inicjalizuje i uruchamia program
        public void initAndRun()
        {
            CallBacks callBacks = new CallBacks {             //inicjalizacja callbacków
                out_registerBoard = in_registerBoard,
                out_sendShipsInfo = in_sendShipsInfo,
                out_sendShotMap   = in_sendShotMap,
                out_error         = in_error,
                out_plannerMode   = in_plannerMode,
                out_getCoords     = in_getCoords,
                out_sendShotInfo  = in_sendShotInfo
            };
            InitData init = new InitData {
                player1type = PlayerType.HUMAN,
                player2type = PlayerType.AI
            };

            dllThread = new Thread(() => runProgram(init, callBacks));
            dllThread.IsBackground = true;
            dllThread.Start();
        }
Пример #2
0
 public static extern void runProgram(InitData init, CallBacks callBacks);