|
|
@@ -1,9 +1,16 @@ |
|
|
|
from cli import * |
|
|
|
from cli_test import * |
|
|
|
from llm_test import * |
|
|
|
from llm_test_Python import * |
|
|
|
from memory_test import * |
|
|
|
from Controller import * |
|
|
|
import sys |
|
|
|
|
|
|
|
print(llm_test_Python_copyByValue()) |
|
|
|
print(llm_test_isDigit_digit()) |
|
|
|
print(llm_test_isDigit_notDigit()) |
|
|
|
print(llm_test_strToInt()) |
|
|
|
|
|
|
|
print(memory_test_detectMismatchedItems()) |
|
|
|
print(memory_test_detectMismatchedItems_itemTwice()) |
|
|
|
print(memory_test_detectVictory()) |
|
|
@@ -28,28 +35,28 @@ print(cli_test_reportMatchedItems()) |
|
|
|
print(cli_test_reportMismatchedItems()) |
|
|
|
print(cli_test_reportVictory()) |
|
|
|
|
|
|
|
|
|
|
|
ctrl = Controller(memory_createContext()) |
|
|
|
ctrl.registerFunction(cli_exit) |
|
|
|
ctrl.registerFunction(cli_goOn) |
|
|
|
ctrl.registerFunction(cli_greetUser) |
|
|
|
ctrl.registerFunction(cli_promptSecondItemSelection) |
|
|
|
ctrl.registerFunction(cli_reportMatchedItems) |
|
|
|
ctrl.registerFunction(cli_reportMismatchedItems) |
|
|
|
ctrl.registerFunction(cli_reportVictory) |
|
|
|
ctrl.registerFunction(cli_selectItem) |
|
|
|
ctrl.registerFunction(cli_showHelp) |
|
|
|
ctrl.registerFunction(memory_detectMismatchedItems) |
|
|
|
ctrl.registerFunction(memory_detectVictory) |
|
|
|
ctrl.registerFunction(memory_generateConstPlayfield) |
|
|
|
ctrl.registerFunction(memory_hideMatchingItems) |
|
|
|
ctrl.registerFunction(memory_selectItem) |
|
|
|
ctrl.registerFunctions([ |
|
|
|
cli_exit, |
|
|
|
cli_goOn, |
|
|
|
cli_greetUser, |
|
|
|
cli_promptSecondItemSelection, |
|
|
|
cli_reportMatchedItems, |
|
|
|
cli_reportMismatchedItems, |
|
|
|
cli_reportVictory, |
|
|
|
cli_selectItem, |
|
|
|
cli_showHelp, |
|
|
|
memory_detectMismatchedItems, |
|
|
|
memory_detectVictory, |
|
|
|
memory_generateConstPlayfield, |
|
|
|
memory_hideMatchingItems, |
|
|
|
memory_selectItem, |
|
|
|
]) |
|
|
|
|
|
|
|
def printOutput(c): |
|
|
|
if c.recentField.startswith("output"): |
|
|
|
print(c.field(c.recentField)) |
|
|
|
ctrl.registerCallback(printOutput) |
|
|
|
#ctrl.registerCallback(lambda c: print(f"ИГР App.dbg ctx: '{c}'")) |
|
|
|
ctrl.registerFieldCallback("exit", lambda c: sys.exit(0)) |
|
|
|
|
|
|
|
ctrl.set("didLaunch", True) |
|
|
|