Exemplo n.º 1
0
 public CardCollect Run(CardCollect cc)
 {
     CozyLuaCore lua = new CozyLuaCore();
     lua.LoadCLRPackage();
     lua.DoString("import ('CozyPoker.Engine', 'CozyPoker.Engine.Model')");
     lua.DoString("import ('CozyPoker.Engine', 'CozyPoker.Engine.Util')");
     lua.DoFile(PathTransform.LuaScript(script_));
     var f = lua.GetFunction("deal");
     return (CardCollect)f.Call(cc).First();
 }
Exemplo n.º 2
0
 public void Run(CardCollect cc)
 {
     CozyLuaCore lua = new CozyLuaCore();
     lua.LoadCLRPackage();
     lua.DoString("import ('CozyPoker.Engine', 'CozyPoker.Engine.Model')");
     lua.DoString("import ('CozyPoker.Engine', 'CozyPoker.Engine.Util')");
     lua.DoFile(PathTransform.LuaScript(script_));
     var f = lua.GetFunction("shuffle");
     f.Call(cc);
 }
Exemplo n.º 3
0
 public CardCollect Run()
 {
     CozyLuaCore lua = new CozyLuaCore();
     lua.LoadCLRPackage();
     lua.DoString("import ('CozyPoker.Engine', 'CozyPoker.Engine.Model')");
     lua.DoString("import ('CozyPoker.Engine', 'CozyPoker.Engine.Util')");
     lua.DoFile(PathTransform.LuaScript(script_));
     //lua.DoString(@" import ('CozyPoker.Engine', 'CozyPoker.Engine.Model')");
     //lua.DoString(@"
     //    cc = CardCollect()
     //    c = Card(1,1)
     //    cc:Add(c)");
     return (CardCollect)lua["cc"];
 }