moving cards to empty space

This commit is contained in:
Alexander Yakovlev 2024-04-26 20:37:14 +06:00
parent 0313ba4f34
commit b18da25727
Signed by: oreolek
GPG key ID: 8269E24B4008E32A
2 changed files with 14 additions and 16 deletions

View file

@ -1,11 +1,3 @@
VAR Inventory = ()
=== function take(x)
~ Inventory += x
=== function have(x)
~ return Inventory ? x
=== function came_from(-> x)
~ return TURNS_SINCE(x) == 0

View file

@ -11,13 +11,13 @@ VAR col6 = ()
VAR col7 = ()
VAR col8 = ()
VAR empty1 = ""
VAR empty2 = ""
VAR empty1 = ()
VAR empty2 = ()
VAR full1 = ""
VAR full2 = ""
VAR full3 = ""
VAR full4 = ""
VAR full1 = ()
VAR full2 = ()
VAR full3 = ()
VAR full4 = ()
// Put 7 random cards to slot 1
~ col1 += randomcard(cards)
@ -105,8 +105,14 @@ full3 is: {full3}
full4 is: {full4}
Cards left: {LIST_COUNT(cards)}
col1 is black? {is_black(col1)}
{empty1 == (): Move card from col1 to empty1 -> move_from_col1_to_empty1}
-> END
=== move_from_col1_to_empty1
~ empty1 += pop(col1)
-> main