private void startGame() { if (!PlEngine.IsInitialized) { // Thread clean = new Thread(); //string filename = @"C:\Users\Mathieu\Documents\Visual Studio 2015\Projects\TarotAfricain\TarotAfricain\Prolog\prolog.pro"; string filename = "TarotAfrikMulti.pl"; string text = System.IO.File.ReadAllText(filename); string serialNames = SerializeList(names); string serialIsIa = SerializeList(isIa); String[] param = { "-q", "-f", filename }; string query = "playGame(" + serialNames + ", " + serialIsIa + ", " + nbCarte.ToString() + "), write('end')."; PlEngine.Initialize(param); Debug.WriteLine(PlEngine.IsInitialized); Debug.WriteLine(PlEngine.PlThreadSelf()); //Debug.WriteLine("Attachement : " + PlEngine.PlThreadAttachEngine()); PlEngine.SetStreamFunctionWrite(SbsSW.SwiPlCs.Streams.PlStreamType.Output, stdout); InitializeCallBack(); PlQuery.PlCall(query); Debug.WriteLine("end"); } }