Solve triangle solitaire puzzle: Difference between revisions
m
→{{header|EasyLang}}
Line 373:
┗━━━━━━━━━┛
"
solution$ = ""▼
#
func solve .
▲ solution$ = ""
for pos range len brd$[]
if brd$[pos] = "●"
Line 384:
brd$[pos + dir] = "·"
brd$[pos + 2 * dir] = "●"
call solve
brd$[pos] = "●"
brd$[pos + dir] = "●"
brd$[pos + 2 * dir] = "·"
if
break 2
.
Line 395:
.
.
if
solution$ = str_join brd$[] & solution$
.
.
call solve
print solution$
</lang>
|