d
This commit is contained in:
10
v4/main.py
10
v4/main.py
@@ -1,4 +1,6 @@
|
|||||||
from memory_test import *
|
from memory_test import *
|
||||||
|
from memoryCLI import *
|
||||||
|
import sys
|
||||||
|
|
||||||
print(memory_test_generateConstPlayfield())
|
print(memory_test_generateConstPlayfield())
|
||||||
print(memory_test_selectItem_1x())
|
print(memory_test_selectItem_1x())
|
||||||
@@ -8,3 +10,11 @@ print(memory_test_shouldDeselectMismatchedItems())
|
|||||||
print(memory_test_shouldDeselectMismatchedItems_itemTwice())
|
print(memory_test_shouldDeselectMismatchedItems_itemTwice())
|
||||||
print(memory_test_shouldDetectVictory())
|
print(memory_test_shouldDetectVictory())
|
||||||
print(memory_test_shouldHideMatchingItems())
|
print(memory_test_shouldHideMatchingItems())
|
||||||
|
|
||||||
|
c = memoryCLI_createContext()
|
||||||
|
c = memoryCLI_greetUser(c)
|
||||||
|
print(c.output)
|
||||||
|
|
||||||
|
for line in sys.stdin:
|
||||||
|
ln = line.rstrip()
|
||||||
|
print(f"you entered: '{ln}'")
|
||||||
|
|||||||
20
v4/memoryCLI.py
Normal file
20
v4/memoryCLI.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
from memoryCLI_Context import *
|
||||||
|
from llm import *
|
||||||
|
|
||||||
|
# Greet the user.
|
||||||
|
#
|
||||||
|
# Conditions:
|
||||||
|
# 1. No input is present (the app just got launched)
|
||||||
|
@llm_by_value
|
||||||
|
def memoryCLI_greetUser(
|
||||||
|
c: memoryCLI_Context
|
||||||
|
) -> memoryCLI_Context:
|
||||||
|
if (
|
||||||
|
c.input == ""
|
||||||
|
):
|
||||||
|
c.output = "OGS Memory TextUI greets you, %USERNAME%. Let's play!"
|
||||||
|
c.recentField = "output"
|
||||||
|
return c
|
||||||
|
c.recentField = "none"
|
||||||
|
return c
|
||||||
|
#}
|
||||||
7
v4/memoryCLI_Context.py
Normal file
7
v4/memoryCLI_Context.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
class memoryCLI_Context:
|
||||||
|
def __init__(self):
|
||||||
|
self.input = ""
|
||||||
|
self.output = ""
|
||||||
|
|
||||||
|
def memoryCLI_createContext():
|
||||||
|
return memoryCLI_Context()
|
||||||
Reference in New Issue
Block a user