d
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
from memory_api_test import *
|
||||
from memory_seq_test import *
|
||||
|
||||
print(memory_api_test_deselectMismatchedItems())
|
||||
print(memory_api_test_detectVictory())
|
||||
print(memory_api_test_generateConstPlayfield())
|
||||
print(memory_api_test_hideMatchingItems())
|
||||
print(memory_api_test_selectItem())
|
||||
|
||||
print(memory_seq_test_selectTwoItems())
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from memory_api import *
|
||||
from memory_api_Context import *
|
||||
from llm import *
|
||||
|
||||
def memory_api_test_deselectMismatchedItems(
|
||||
) -> str:
|
||||
|
||||
50
v3/memory_seq_test.py
Normal file
50
v3/memory_seq_test.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from memory_api import *
|
||||
from memory_api_Context import *
|
||||
from memory_seq import *
|
||||
from memory_seq_Context import *
|
||||
|
||||
def memory_seq_test_selectThreeItems(
|
||||
) -> str:
|
||||
seq = memory_seq_createContext()
|
||||
|
||||
seq.api = memory_api_createContext()
|
||||
seq.api.playfieldSize = 2
|
||||
seq.api = memory_api_generateConstPlayfield(seq.api)
|
||||
|
||||
seq.itemsToSelect = [0, 1, 2]
|
||||
seq = memory_seq_selectItems(seq)
|
||||
|
||||
# See if only one (last) item is selected now.
|
||||
if (
|
||||
seq.api.recentField == "selectedItems" and
|
||||
len(seq.api.selectedItems) == 1 and
|
||||
seq.api.selectedItems[0] == 2
|
||||
):
|
||||
return "OK: memory_seq_selectThreeItems"
|
||||
#}
|
||||
return "ERR: memory_seq_selectThreeItems"
|
||||
#}
|
||||
|
||||
def memory_seq_test_selectTwoItems(
|
||||
) -> str:
|
||||
seq = memory_seq_createContext()
|
||||
|
||||
seq.api = memory_api_createContext()
|
||||
seq.api.playfieldSize = 2
|
||||
seq.api = memory_api_generateConstPlayfield(seq.api)
|
||||
|
||||
seq.itemsToSelect = [0, 1]
|
||||
seq = memory_seq_selectItems(seq)
|
||||
|
||||
# See if both items are selected now.
|
||||
if (
|
||||
seq.api.recentField == "selectedItems" and
|
||||
len(seq.api.selectedItems) == 2 and
|
||||
seq.api.selectedItems[0] == 0 and
|
||||
seq.api.selectedItems[1] == 1
|
||||
):
|
||||
return "OK: memory_seq_selectTwoItems"
|
||||
#}
|
||||
return "ERR: memory_seq_selectTwoItems"
|
||||
#}
|
||||
|
||||
Reference in New Issue
Block a user