Minor interface changes

This commit is contained in:
Gavin Whelan 2014-05-31 14:11:11 -07:00
parent a03634a7e1
commit 7eea04ce1e
3 changed files with 9 additions and 7 deletions

View File

@ -1013,11 +1013,12 @@
[(awoe -.alt) (alot +.alt)]
::
++ auld :: auld:ez
|= [gem=germ sab=saba] :: construct merge
|= [gem=germ who=ship des=desk sab=saba] :: construct merge
^- (unit (unit nori)) ::::::
=+ ^= viq ^- [p=@ud q=@ud r=waks] :: merge status
=+ viq=(~(get by ang) [p.sab q.sab]) ::
?~(viq [0 0 ~] u.viq) ::
=. sab sab(s (skip s.sab (clen who des))) ::
=. sab ::
?: =(q.viq p.r.sab) sab :: perfect motion
?> (gth q.viq p.r.sab) :: proper motion
@ -1025,7 +1026,6 @@
p.r q.viq ::
s (slag (sub q.viq p.r.sab) s.sab) :: remove excess
== ::
=. sab sab(s (skip s.sab (clen p.sab q.sab))) ::
?~ s.sab [~ ~] :: up to date
=+ ^= mus ^- masu :: sync square
[p.sab q.sab [p.viq +(let)] [q.viq q.r.sab] r.viq]
@ -1036,7 +1036,7 @@
%+ skip
%+ turn (scag (sub let p.viq) hit) :: remove excess
|=(a=frog q.a)
(clen p.sab q.sab)
(clen who des)
=+ tig=(mang [arum r.viq tak kat] |=(* *(unit))) :: moves
?^ tig
=+ res=((hard ,[waks (list tako)]) u.tig)

View File

@ -18,7 +18,7 @@
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen]))
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen]))
=+ sab=`saba`[bos des [0 let.der] (flop (turn hit.der |=(a=frog q.a)))]
=+ lum=(~(auld ze est owr) ?~(gem %fine -.gem) sab)
=+ lum=(~(auld ze est owr) ?~(gem %fine -.gem) who des sab)
?~ lum
^- gift
[%la %leaf "{(trip des)} failed to merge, please rerun with a merge option"]

View File

@ -15,12 +15,14 @@
=+ vsr=((hard dome) .^(%cv pes))
=+ ves=((hard dome) .^(%cv pen))
=+ ^= sab ^- saba :*
(need (slaw 'p' sen.pen))
den.pen
(need (slaw 'p' ses.pes))
des.pes
[0 let.vsr]
(flop (turn hit.vsr |=(a=frog q.a)))
==
=+ lum=(~(auld ze est ves) ?~(gem %fine -.gem) sab)
=+ ^= lum
%- ~(auld ze est ves)
[?~(gem %fine -.gem) (need (slaw 'p' sen.pen)) den.pen sab]
?~ lum
^- gift
:* %la %leaf