mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Split octo into three versions.
This commit is contained in:
parent
4a0517f666
commit
69059e72c0
@ -1,121 +0,0 @@
|
||||
:: :::::::::::::::
|
||||
:::: /hook/core/acto/ape :: :: :: build
|
||||
:: :::::::::::::::
|
||||
/- *sole :: structures
|
||||
/+ sole :: libraries
|
||||
:: :::::::::::::::
|
||||
:::: :: :: :: logic
|
||||
!: :::::::::::::::
|
||||
=> |% :: board logic
|
||||
++ board ,@ :: one-player bitfield
|
||||
++ point ,[x=@ y=@] :: coordinate
|
||||
++ game ,[who=? box=board boo=board] :: game state
|
||||
++ icon |=(? ?:(+< 'X' 'O')) :: display at
|
||||
++ bo :: per board
|
||||
|_ bud=board ::
|
||||
++ get |=(point =(1 (cut 0 [(off +<) 1] bud))) :: get point
|
||||
++ off |=(point (add x (mul 3 y))) :: bitfield address
|
||||
++ set |=(point (con bud (bex (off +<)))) :: set point
|
||||
++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win
|
||||
(rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks
|
||||
-- ::
|
||||
++ go :: per game
|
||||
|_ game ::
|
||||
++ at |_ point :: per point
|
||||
++ g +>+< :: game
|
||||
++ k !|(x o) :: ok move
|
||||
++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move
|
||||
++ o (~(get bo boo) +<) :: old at o
|
||||
++ p .(boo (~(set bo boo) +<)) :: play at o
|
||||
++ t .(who !who) :: take turn
|
||||
++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view
|
||||
++ x (~(get bo box) +<) :: old at x
|
||||
++ y .(box (~(set bo box) +<)) :: play at x
|
||||
-- ::
|
||||
++ res ?: ~(win bo box) `"{~[(icon &)]} wins" :: result
|
||||
?: ~(win bo boo) `"{~[(icon |)]} wins" ::
|
||||
?: =(511 (con boo box)) `"tie :-(" ~ ::
|
||||
++ row |= y=@ :~ (add y '1') :: print row
|
||||
' ' ~(v at y 0) ::
|
||||
' ' ~(v at y 1) ::
|
||||
' ' ~(v at y 2) ::
|
||||
== ::
|
||||
++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table
|
||||
-- ::
|
||||
-- ::
|
||||
:: :::::::::::::::
|
||||
:::: :: :: :: agent
|
||||
:: :::::::::::::::
|
||||
=> |% :: arvo structures
|
||||
++ axle ,[%0 eye=face gam=game] :: agent state
|
||||
++ card ,[%diff lime] :: update
|
||||
++ face (pair (list ,@c) (map bone sole-share)) :: interface
|
||||
++ lime ,[%sole-effect sole-effect] :: :sole update
|
||||
++ move (pair bone card) :: cause and action
|
||||
-- ::
|
||||
=> |% :: parsers
|
||||
++ colm (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row or column
|
||||
++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate
|
||||
-- ::
|
||||
|_ [hid=hide moz=(list move) axle] :: per server
|
||||
++ et ::
|
||||
|_ [from say=sole-share] :: per console client
|
||||
++ abet +>(q.eye (~(put by q.eye) ost say)) :: continue
|
||||
++ amok +>(q.eye (~(del by q.eye) ost)) :: discontinue
|
||||
++ beep (emit %bel ~) :: bad user
|
||||
++ delt |= cal=sole-change :: input line change
|
||||
=^ cul say (remit:sole cal good) ::
|
||||
?~ cul (park:abet(p.eye buf.say) | ~) ::
|
||||
abet:beep:(emit det/u.cul) ::
|
||||
++ emit |= fec=sole-effect ^+ +> :: send effect
|
||||
+>(moz [[ost %diff %sole-effect fec] moz]) ::
|
||||
++ emil |= fex=(list sole-effect) :: send effects
|
||||
?~(fex +> $(fex t.fex, +> (emit i.fex))) ::
|
||||
++ good |=((list ,@c) -:(rose (tufa +<) come)) :: valid input
|
||||
++ kick |= point :: move command
|
||||
=^ dud gam ~(m ~(at go gam) +<) ::
|
||||
?. dud abet:beep =+ mus=~(res go gam) ::
|
||||
(park:abet(gam ?^(mus *game gam)) %2 mus) ::
|
||||
++ line =^ cal say (transmit:sole set/p.eye) :: update command
|
||||
(emit %det cal) ::
|
||||
++ make =+ dur=(rust (tufa p.eye) come) ::
|
||||
?~ dur abet:beep ::
|
||||
(kick:line(p.eye ~) +.dur) ::
|
||||
++ mean |=((unit tape) ?~(+< +> (emit txt/+<+))) :: optional message
|
||||
++ play |= lev=?(%0 %1 %2) :: update by level
|
||||
?-(lev %0 +>, %1 line, %2 line:show:prom) ::
|
||||
++ plow |= [lev=?(%0 %1 %2) mus=(unit tape)] :: complete print
|
||||
abet:(mean:(play lev) mus) ::
|
||||
++ prom %^ emit %pro %& :- %acto :: update prompt
|
||||
": {~[(icon who.gam)]} to move (row/col): " ::
|
||||
++ rend (turn `wall`~(tab go gam) |=(tape txt/+<)) :: table print
|
||||
++ show (emit %mor rend) :: update board
|
||||
++ sole ~(. cs say) :: console library
|
||||
++ work |= act=sole-action :: console input
|
||||
?:(?=(%det -.act) (delt +.act) make) ::
|
||||
-- ::
|
||||
++ abet [(flop moz) .(moz ~)] :: resolve core
|
||||
++ flet |=(from ~(. et +< (~(got by q.eye) ost))) :: in old client
|
||||
++ fret |=(from ~(. et +< *sole-share)) :: in new client
|
||||
++ pals %+ turn (pale hid (prix /sole)) |= sink :: per console
|
||||
[[p=p.+< q=q.+<] r=(~(got by q.eye) p.+<)] ::
|
||||
++ park |= [lev=?(%0 %1 %2) mus=(unit tape)] :: update all
|
||||
=+ pals ::
|
||||
|- ^+ +>.^$ ?~ +< +>.^$ ::
|
||||
$(+< t.+<, +>.^$ (~(plow et i.+<) lev mus)) ::
|
||||
:: :::::::::::::::
|
||||
:::: :: :: :: hooks
|
||||
:: :::::::::::::::
|
||||
++ peer-sole :: console subscribe
|
||||
|= [from *] =< abet ::
|
||||
(plow:(fret +<-) %2 ~) ::
|
||||
++ poke-sole-action :: console input
|
||||
|= [from act=sole-action] =< abet ::
|
||||
(work:(flet +<-) act) ::
|
||||
++ prep |= [from old=(unit ,[(list move) axle])] :: initialize
|
||||
=< abet ?~ old +> =< (park %2 ~) ::
|
||||
+>(+<+ u.old) ::
|
||||
++ pull-sole :: disconnect console
|
||||
|= [from *] =< abet ::
|
||||
amok:(flet +<-) ::
|
||||
--
|
@ -1,9 +1,9 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/acto/ape :::::: dependencies
|
||||
:::: /hook/core/oct1/ape :::::: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo version
|
||||
/- *sole, *octo :: structures
|
||||
/+ sole, octo :: libraries
|
||||
/- *sole, *oct1 :: structures
|
||||
/+ sole, oct1 :: libraries
|
||||
:: :: ::
|
||||
:::: :::::: interfaces
|
||||
!: :: ::
|
||||
@ -17,10 +17,10 @@
|
||||
== ::
|
||||
++ face (map bone sole-share) :: console state
|
||||
++ lime $% [%sole-effect sole-effect] :: :sole update
|
||||
[%octo-update play] :: :octo update
|
||||
[%oct1-update play] :: :oct1 update
|
||||
== ::
|
||||
++ move (pair bone card) :: cause and action
|
||||
++ pear ,[%octo-move point] :: outgoing move
|
||||
++ pear ,[%oct1-move point] :: outgoing move
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: past state
|
||||
@ -61,7 +61,7 @@
|
||||
=> .(ost p.i.all, src q.i.all) ::
|
||||
$(all t.all, +>.^$ (fun +>.^$)) ::
|
||||
++ eels (~(tap by sup)) :: all clients
|
||||
++ elfs (prey /octo +<-) :: network clients
|
||||
++ elfs (prey /oct1 +<-) :: network clients
|
||||
++ elks (prey /sole +<-) :: console clients
|
||||
++ emit |=(lime (dish %diff +<)) :: publish
|
||||
++ flap |= [net=bike con=bike] :: update all clients
|
||||
@ -72,7 +72,7 @@
|
||||
:: :: ::
|
||||
++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error
|
||||
++ fect |=(sole-effect (emit %sole-effect +<)) :: update console
|
||||
++ fact |=(play (emit %octo-update +<)) :: update partner
|
||||
++ fact |=(play (emit %oct1-update +<)) :: update partner
|
||||
++ harp |=(game ?:(=(gam +<) +> wild(gam +<))) :: update game
|
||||
++ heal |= old=axon =. +>+<+> (wake old) :: complete update
|
||||
=- +>.$(gam -) ?. !=(1 +<-) gam ::
|
||||
@ -85,15 +85,15 @@
|
||||
?^(rem fail link(rem +<)) ::
|
||||
++ plot |= (each point (unit ship)) :: apply command
|
||||
?-(+<- & (kick +<+), | (plan +<+)) ::
|
||||
++ like |*(* [/octo [+.rem dap] +<]) :: friend message
|
||||
++ link (dish peer/(like /octo)) :: subscribe to friend
|
||||
++ like |*(* [/oct1 [+.rem dap] +<]) :: friend message
|
||||
++ link (dish peer/(like /oct1)) :: subscribe to friend
|
||||
++ lose ?^(rem . tame(gam out:here)) :: lost subscriber
|
||||
++ meet ?^(rem . tame(gam inn:here)) :: gained subscriber
|
||||
++ prom (fect %pro %& %octo stat) :: update prompt
|
||||
++ prom (fect %pro %& %oct1 stat) :: update prompt
|
||||
++ rend (turn `wall`tab:here |=(tape txt/+<)) :: table print
|
||||
++ sawn lose(eye (~(del by eye) ost)) :: console unsubscribe
|
||||
++ seen meet(eye (~(put by eye) ost *sole-share)) :: console subscribe
|
||||
++ send |=(point (dish poke/(like %octo-move +<))) :: send move
|
||||
++ send |=(point (dish poke/(like %oct1-move +<))) :: send move
|
||||
++ show prom:(fect %mor rend) :: update console
|
||||
++ soul =(%sole -:q:(~(got by sup) ost)) :: is console
|
||||
++ stat (weld ?~(rem ~ "@{(scow p/u.rem)}") voy:here) :: prompt line
|
||||
@ -125,15 +125,15 @@
|
||||
:: :: ::
|
||||
:::: :::::: arvo handlers
|
||||
:: :: ::
|
||||
++ reap-octo |=([* (unit)] abet:(with =(~ +<+))) :: linked to friend
|
||||
++ coup-octo |=([* (unit)] abet:?~(+<+ +> fail)) :: move acknowledge
|
||||
++ diff-octo-update |=([* play] abet:(hear +<+)) :: network update
|
||||
++ peer-octo |=(* abet:tame:meet) :: urbit subscribe
|
||||
++ reap-oct1 |=([* (unit)] abet:(with =(~ +<+))) :: linked to friend
|
||||
++ coup-oct1 |=([* (unit)] abet:?~(+<+ +> fail)) :: move acknowledge
|
||||
++ diff-oct1-update |=([* play] abet:(hear +<+)) :: network update
|
||||
++ peer-oct1 |=(* abet:tame:meet) :: urbit subscribe
|
||||
++ peer-sole |=(* abet:show:seen) :: console subscribe
|
||||
++ poke-sole-action |=(sole-action abet:(work +<)) :: console input
|
||||
++ poke-octo-move |=(point abet:wild:(kick +<)) :: urbit move
|
||||
++ poke-oct1-move |=(point abet:wild:(kick +<)) :: urbit move
|
||||
++ prep |=(agon abet:?~(+< +> (heal +<+>))) :: load state
|
||||
++ pull-octo |=(* abet:lose) :: urbit unsubscribe
|
||||
++ pull-oct1 |=(* abet:lose) :: urbit unsubscribe
|
||||
++ pull-sole |=(* abet:sawn) :: console unsubscribe
|
||||
++ quit-octo |=(* abet:?~(rem +> wild(rem ~))) :: unlinked by friend
|
||||
++ quit-oct1 |=(* abet:?~(rem +> wild(rem ~))) :: unlinked by friend
|
||||
--
|
139
base/ape/oct2/core.hook
Normal file
139
base/ape/oct2/core.hook
Normal file
@ -0,0 +1,139 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/oct2/ape :::::: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo version
|
||||
/- *sole, *oct2 :: structures
|
||||
/+ sole, oct2 :: libraries
|
||||
:: :: ::
|
||||
:::: :::::: interfaces
|
||||
!: :: ::
|
||||
=> |% ::
|
||||
++ axle ,[eye=face rem=(unit ship) gam=game] :: agent state
|
||||
++ card $% [%diff lime] :: update
|
||||
[%quit ~] :: cancel
|
||||
[%peer wire dock path] :: subscribe
|
||||
[%poke wire dock pear] :: send move
|
||||
[%pull wire dock ~] :: unsubscribe
|
||||
== ::
|
||||
++ face (map bone sole-share) :: console state
|
||||
++ lime $% [%sole-effect sole-effect] :: :sole update
|
||||
[%oct2-update play] :: :oct2 update
|
||||
== ::
|
||||
++ move (pair bone card) :: cause and action
|
||||
++ pear ,[%oct2-move point] :: outgoing move
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: past state
|
||||
:: :: ::
|
||||
=> |% ::
|
||||
++ agon (unit ,[(list move) axon]) :: boot argument
|
||||
++ axon $%([%1 axle] [%0 axle-0]) :: all states
|
||||
++ axle-0 ,[eye=face gam=game-0] :: old axle
|
||||
++ game-0 ,[who=? box=board boo=board] :: old game
|
||||
++ wake |= axon :- %1 ?- +<- %1 +<+ :: coarse upgrade
|
||||
%0 [eye ~ [who ~^~ ~ box boo]:gam]:+<+ ::
|
||||
== -- ::
|
||||
:: :: ::
|
||||
:::: :::::: parsers
|
||||
:: :: ::
|
||||
=> |% ::
|
||||
++ colm (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row or column
|
||||
++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate
|
||||
++ comb (pick come ;~(pfix sig (punt fed:ag))) :: all command input
|
||||
++ cope |=(? ?:(+< (stag %| (cold ~ sig)) comb)) :: with wait mode
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: process core
|
||||
:: :: ::
|
||||
|_ $: bowl
|
||||
moz=(list move) :: pending actions
|
||||
[%1 axle] :: process state, v1
|
||||
== ::
|
||||
:: :: ::
|
||||
:::: :::::: process tools
|
||||
:: :: ::
|
||||
++ abet [(flop moz) .(moz ~)] :: resolve
|
||||
++ bike $+(_. _+>) :: self-transformer
|
||||
++ dish |=(cad=card %_(+> moz [[ost cad] moz])) :: request
|
||||
++ done (echo eels |=(_. (dish:+< %quit ~))) :: cancel everyone
|
||||
++ echo |= [all=(list sink) fun=bike] =+ old=+>+<- :: publish to all
|
||||
|- ^+ +>.^$ ?~ all +>.^$(+<- old) ::
|
||||
=> .(ost p.i.all, src q.i.all) ::
|
||||
$(all t.all, +>.^$ (fun +>.^$)) ::
|
||||
++ eels (~(tap by sup)) :: all clients
|
||||
++ elfs (prey /oct2 +<-) :: network clients
|
||||
++ elks (prey /sole +<-) :: console clients
|
||||
++ emit |=(lime (dish %diff +<)) :: publish
|
||||
++ flap |= [net=bike con=bike] :: update all clients
|
||||
(echo:(echo elks con) elfs net) ::
|
||||
++ here ~(. go src gam) :: game core
|
||||
:: :: ::
|
||||
:::: :::::: server logic
|
||||
:: :: ::
|
||||
++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error
|
||||
++ fect |=(sole-effect (emit %sole-effect +<)) :: update console
|
||||
++ fact |=(play (emit %oct2-update +<)) :: update partner
|
||||
++ harp |=(game ?:(=(gam +<) +> wild(gam +<))) :: update game
|
||||
++ heal |= old=axon =. +>+<+> (wake old) :: complete update
|
||||
=- +>.$(gam -) ?. !=(1 +<-) gam ::
|
||||
(muy:here (turn eels |=(sink q))) ::
|
||||
++ hear |=(play ?-(+<- | (word +<+), & (harp +<+))) :: network update
|
||||
++ kick |= point =^ dud gam ~(m at:here +<) ::
|
||||
?.(dud fail wild:?~(rem kind (send +>-))) ::
|
||||
++ kind =+(res:here ?~(- + (word(gam new:here) ->))) :: move result
|
||||
++ plan |= (unit ship) ?~ +< stop(gam new:here) :: link/unlink
|
||||
?^(rem fail link(rem +<)) ::
|
||||
++ plot |= (each point (unit ship)) :: apply command
|
||||
?-(+<- & (kick +<+), | (plan +<+)) ::
|
||||
++ like |*(* [/oct2 [+.rem dap] +<]) :: friend message
|
||||
++ link (dish peer/(like /oct2)) :: subscribe to friend
|
||||
++ lose ?^(rem . tame(gam out:here)) :: lost subscriber
|
||||
++ meet ?^(rem . tame(gam inn:here)) :: gained subscriber
|
||||
++ prom (fect %pro %& %oct2 stat) :: update prompt
|
||||
++ rend (turn `wall`tab:here |=(tape txt/+<)) :: table print
|
||||
++ sawn lose(eye (~(del by eye) ost)) :: console unsubscribe
|
||||
++ seen meet(eye (~(put by eye) ost *sole-share)) :: console subscribe
|
||||
++ send |=(point (dish poke/(like %oct2-move +<))) :: send move
|
||||
++ show prom:(fect %mor rend) :: update console
|
||||
++ soul =(%sole -:q:(~(got by sup) ost)) :: is console
|
||||
++ stat (weld ?~(rem ~ "@{(scow p/u.rem)}") voy:here) :: prompt line
|
||||
++ stop ?~(rem done wild:(dish pull/(like ~))) :: unsubscribe
|
||||
++ tame (flap |=(_. (fact:+< &/gam)) |=(_. prom:+<)) :: light update
|
||||
++ wild (flap |=(_. (fact:+< &/gam)) |=(_. show:+<)) :: full update
|
||||
++ with |=(? (word(rem ?:(+< rem ~)) "{<[+< src]>}")) ::
|
||||
++ word |= txt=tape %+ flap :: game message
|
||||
|=(_+> (fact:+< |/txt)) ::
|
||||
|=(_+> (fect:+< txt/txt)) ::
|
||||
:: :: ::
|
||||
:::: :::::: console UI
|
||||
:: :: ::
|
||||
++ work :: console action
|
||||
|= act=sole-action ::
|
||||
=+ say=(~(got by eye) ost) ::
|
||||
|^ ?:(?=(%det -.act) (delt +.act) dive) ::
|
||||
++ abet ..work(eye (~(put by eye) ost say)) :: resolve
|
||||
++ cusp (cope !ept:here) :: parsing rule
|
||||
++ delt |= cal=sole-change :: edit command line
|
||||
=^ cul say (~(remit cs say) cal good) ::
|
||||
?~(cul abet fail:(fect:abet det/u.cul)) ::
|
||||
++ dive =+ (rust (tufa buf.say) (punt comb)) :: apply command line
|
||||
?~(- fail ?~(-> show (plot:wipe ->+))) ::
|
||||
++ good |=((list ,@c) -:(rose (tufa +<) cusp)) :: validate input
|
||||
++ wipe =^ cal say (~(transmit cs say) set/~) :: clear line
|
||||
(fect:abet %det cal) ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: arvo handlers
|
||||
:: :: ::
|
||||
++ reap-oct2 |=([* (unit)] abet:(with =(~ +<+))) :: linked to friend
|
||||
++ coup-oct2 |=([* (unit)] abet:?~(+<+ +> fail)) :: move acknowledge
|
||||
++ diff-oct2-update |=([* play] abet:(hear +<+)) :: network update
|
||||
++ peer-oct2 |=(* abet:tame:meet) :: urbit subscribe
|
||||
++ peer-sole |=(* abet:show:seen) :: console subscribe
|
||||
++ poke-sole-action |=(sole-action abet:(work +<)) :: console input
|
||||
++ poke-oct2-move |=(point abet:wild:(kick +<)) :: urbit move
|
||||
++ prep |=(agon abet:?~(+< +> (heal +<+>))) :: load state
|
||||
++ pull-oct2 |=(* abet:lose) :: urbit unsubscribe
|
||||
++ pull-sole |=(* abet:sawn) :: console unsubscribe
|
||||
++ quit-oct2 |=(* abet:?~(rem +> wild(rem ~))) :: unlinked by friend
|
||||
--
|
139
base/ape/oct3/core.hook
Normal file
139
base/ape/oct3/core.hook
Normal file
@ -0,0 +1,139 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/oct3/ape :::::: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo version
|
||||
/- *sole, *oct3 :: structures
|
||||
/+ sole, oct3 :: libraries
|
||||
:: :: ::
|
||||
:::: :::::: interfaces
|
||||
!: :: ::
|
||||
=> |% ::
|
||||
++ axle ,[eye=face rem=(unit ship) gam=game] :: agent state
|
||||
++ card $% [%diff lime] :: update
|
||||
[%quit ~] :: cancel
|
||||
[%peer wire dock path] :: subscribe
|
||||
[%poke wire dock pear] :: send move
|
||||
[%pull wire dock ~] :: unsubscribe
|
||||
== ::
|
||||
++ face (map bone sole-share) :: console state
|
||||
++ lime $% [%sole-effect sole-effect] :: :sole update
|
||||
[%oct3-update play] :: :oct3 update
|
||||
== ::
|
||||
++ move (pair bone card) :: cause and action
|
||||
++ pear ,[%oct3-move point] :: outgoing move
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: past state
|
||||
:: :: ::
|
||||
=> |% ::
|
||||
++ agon (unit ,[(list move) axon]) :: boot argument
|
||||
++ axon $%([%1 axle] [%0 axle-0]) :: all states
|
||||
++ axle-0 ,[eye=face gam=game-0] :: old axle
|
||||
++ game-0 ,[who=? box=board boo=board] :: old game
|
||||
++ wake |= axon :- %1 ?- +<- %1 +<+ :: coarse upgrade
|
||||
%0 [eye ~ [who ~^~ ~ box boo]:gam]:+<+ ::
|
||||
== -- ::
|
||||
:: :: ::
|
||||
:::: :::::: parsers
|
||||
:: :: ::
|
||||
=> |% ::
|
||||
++ colm (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row or column
|
||||
++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate
|
||||
++ comb (pick come ;~(pfix sig (punt fed:ag))) :: all command input
|
||||
++ cope |=(? ?:(+< (stag %| (cold ~ sig)) comb)) :: with wait mode
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: process core
|
||||
:: :: ::
|
||||
|_ $: bowl
|
||||
moz=(list move) :: pending actions
|
||||
[%1 axle] :: process state, v1
|
||||
== ::
|
||||
:: :: ::
|
||||
:::: :::::: process tools
|
||||
:: :: ::
|
||||
++ abet [(flop moz) .(moz ~)] :: resolve
|
||||
++ bike $+(_. _+>) :: self-transformer
|
||||
++ dish |=(cad=card %_(+> moz [[ost cad] moz])) :: request
|
||||
++ done (echo eels |=(_. (dish:+< %quit ~))) :: cancel everyone
|
||||
++ echo |= [all=(list sink) fun=bike] =+ old=+>+<- :: publish to all
|
||||
|- ^+ +>.^$ ?~ all +>.^$(+<- old) ::
|
||||
=> .(ost p.i.all, src q.i.all) ::
|
||||
$(all t.all, +>.^$ (fun +>.^$)) ::
|
||||
++ eels (~(tap by sup)) :: all clients
|
||||
++ elfs (prey /oct3 +<-) :: network clients
|
||||
++ elks (prey /sole +<-) :: console clients
|
||||
++ emit |=(lime (dish %diff +<)) :: publish
|
||||
++ flap |= [net=bike con=bike] :: update all clients
|
||||
(echo:(echo elks con) elfs net) ::
|
||||
++ here ~(. go src gam) :: game core
|
||||
:: :: ::
|
||||
:::: :::::: server logic
|
||||
:: :: ::
|
||||
++ fail ?:(soul (fect %bel ~) ~|(%invalid-move !!)) :: user error
|
||||
++ fect |=(sole-effect (emit %sole-effect +<)) :: update console
|
||||
++ fact |=(play (emit %oct3-update +<)) :: update partner
|
||||
++ harp |=(game ?:(=(gam +<) +> wild(gam +<))) :: update game
|
||||
++ heal |= old=axon =. +>+<+> (wake old) :: complete update
|
||||
=- +>.$(gam -) ?. !=(1 +<-) gam ::
|
||||
(muy:here (turn eels |=(sink q))) ::
|
||||
++ hear |=(play ?-(+<- | (word +<+), & (harp +<+))) :: network update
|
||||
++ kick |= point =^ dud gam ~(m at:here +<) ::
|
||||
?.(dud fail wild:?~(rem kind (send +>-))) ::
|
||||
++ kind =+(res:here ?~(- + (word(gam new:here) ->))) :: move result
|
||||
++ plan |= (unit ship) ?~ +< stop(gam new:here) :: link/unlink
|
||||
?^(rem fail link(rem +<)) ::
|
||||
++ plot |= (each point (unit ship)) :: apply command
|
||||
?-(+<- & (kick +<+), | (plan +<+)) ::
|
||||
++ like |*(* [/oct3 [+.rem dap] +<]) :: friend message
|
||||
++ link (dish peer/(like /oct3)) :: subscribe to friend
|
||||
++ lose ?^(rem . tame(gam out:here)) :: lost subscriber
|
||||
++ meet ?^(rem . tame(gam inn:here)) :: gained subscriber
|
||||
++ prom (fect %pro %& %oct3 stat) :: update prompt
|
||||
++ rend (turn `wall`tab:here |=(tape txt/+<)) :: table print
|
||||
++ sawn lose(eye (~(del by eye) ost)) :: console unsubscribe
|
||||
++ seen meet(eye (~(put by eye) ost *sole-share)) :: console subscribe
|
||||
++ send |=(point (dish poke/(like %oct3-move +<))) :: send move
|
||||
++ show prom:(fect %mor rend) :: update console
|
||||
++ soul =(%sole -:q:(~(got by sup) ost)) :: is console
|
||||
++ stat (weld ?~(rem ~ "@{(scow p/u.rem)}") voy:here) :: prompt line
|
||||
++ stop ?~(rem done wild:(dish pull/(like ~))) :: unsubscribe
|
||||
++ tame (flap |=(_. (fact:+< &/gam)) |=(_. prom:+<)) :: light update
|
||||
++ wild (flap |=(_. (fact:+< &/gam)) |=(_. show:+<)) :: full update
|
||||
++ with |=(? (word(rem ?:(+< rem ~)) "{<[+< src]>}")) ::
|
||||
++ word |= txt=tape %+ flap :: game message
|
||||
|=(_+> (fact:+< |/txt)) ::
|
||||
|=(_+> (fect:+< txt/txt)) ::
|
||||
:: :: ::
|
||||
:::: :::::: console UI
|
||||
:: :: ::
|
||||
++ work :: console action
|
||||
|= act=sole-action ::
|
||||
=+ say=(~(got by eye) ost) ::
|
||||
|^ ?:(?=(%det -.act) (delt +.act) dive) ::
|
||||
++ abet ..work(eye (~(put by eye) ost say)) :: resolve
|
||||
++ cusp (cope !ept:here) :: parsing rule
|
||||
++ delt |= cal=sole-change :: edit command line
|
||||
=^ cul say (~(remit cs say) cal good) ::
|
||||
?~(cul abet fail:(fect:abet det/u.cul)) ::
|
||||
++ dive =+ (rust (tufa buf.say) (punt comb)) :: apply command line
|
||||
?~(- fail ?~(-> show (plot:wipe ->+))) ::
|
||||
++ good |=((list ,@c) -:(rose (tufa +<) cusp)) :: validate input
|
||||
++ wipe =^ cal say (~(transmit cs say) set/~) :: clear line
|
||||
(fect:abet %det cal) ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :::::: arvo handlers
|
||||
:: :: ::
|
||||
++ reap-oct3 |=([* (unit)] abet:(with =(~ +<+))) :: linked to friend
|
||||
++ coup-oct3 |=([* (unit)] abet:?~(+<+ +> fail)) :: move acknowledge
|
||||
++ diff-oct3-update |=([* play] abet:(hear +<+)) :: network update
|
||||
++ peer-oct3 |=(* abet:tame:meet) :: urbit subscribe
|
||||
++ peer-sole |=(* abet:show:seen) :: console subscribe
|
||||
++ poke-sole-action |=(sole-action abet:(work +<)) :: console input
|
||||
++ poke-oct3-move |=(point abet:wild:(kick +<)) :: urbit move
|
||||
++ prep |=(agon abet:?~(+< +> (heal +<+>))) :: load state
|
||||
++ pull-oct3 |=(* abet:lose) :: urbit unsubscribe
|
||||
++ pull-sole |=(* abet:sawn) :: console unsubscribe
|
||||
++ quit-oct3 |=(* abet:?~(rem +> wild(rem ~))) :: unlinked by friend
|
||||
--
|
@ -1,123 +0,0 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/acto/ape :: :: dependencies
|
||||
:: :: ::
|
||||
/- *sole :: structure
|
||||
/+ sole :: library
|
||||
:: :: ::
|
||||
:::: :: :: structures
|
||||
!: :: ::
|
||||
=> |% :: board logic
|
||||
++ board ,@ :: one-player bitfield
|
||||
++ point ,[x=@ y=@] :: coordinate
|
||||
++ game ,[who=? box=board boo=board] :: game state
|
||||
++ icon |=(? ?:(+< 'X' 'O')) :: display at
|
||||
++ bo :: per board
|
||||
|_ bud=board ::
|
||||
++ get |=(point =(1 (cut 0 [(off +<) 1] bud))) :: get point
|
||||
++ off |=(point (add x (mul 3 y))) :: bitfield address
|
||||
++ set |=(point (con bud (bex (off +<)))) :: set point
|
||||
++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win
|
||||
(rip 4 0wl04h0.4A0Aw.4A00s.0e070) ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :: :: semantics
|
||||
:: :: ::
|
||||
++ go :: per game
|
||||
|_ game ::
|
||||
++ at |_ point :: per point
|
||||
++ g +>+< :: game
|
||||
++ k !|(x o) :: ok move
|
||||
++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move
|
||||
++ o (~(get bo boo) +<) :: old at o
|
||||
++ p .(boo (~(set bo boo) +<)) :: play at o
|
||||
++ t .(who !who) :: take turn
|
||||
++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view
|
||||
++ x (~(get bo box) +<) :: old at x
|
||||
++ y .(box (~(set bo box) +<)) :: play at x
|
||||
-- ::
|
||||
++ res ?: ~(win bo box) `"{~[(icon &)]} wins" :: result
|
||||
?: ~(win bo boo) `"{~[(icon |)]} wins" ::
|
||||
?: =(511 (con boo box)) `"tie :-(" ~ ::
|
||||
++ row |= y=@ :~ (add y '1') :: print row
|
||||
' ' ~(v at y 0) ::
|
||||
' ' ~(v at y 1) ::
|
||||
' ' ~(v at y 2) ::
|
||||
== ::
|
||||
++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table
|
||||
-- ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :: :: server
|
||||
:: :: ::
|
||||
=> |% :: arvo structures
|
||||
++ axle ,[%0 eye=face gam=game] :: agent state
|
||||
++ card ,[%diff lime] :: update
|
||||
++ face (pair (list ,@c) (map bone sole-share)) :: interface
|
||||
++ lime ,[%sole-effect sole-effect] :: console update
|
||||
++ move (pair bone card) :: cause and action
|
||||
-- ::
|
||||
=> |% :: parsers
|
||||
++ colm (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row or column
|
||||
++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate
|
||||
-- ::
|
||||
|_ [hid=hide moz=(list move) axle] :: per agent
|
||||
++ et ::
|
||||
|_ [from say=sole-share] :: per console
|
||||
++ abet +>(q.eye (~(put by q.eye) ost say)) :: continue
|
||||
++ amok +>(q.eye (~(del by q.eye) ost)) :: discontinue
|
||||
++ beep (emit %bel ~) :: bad user
|
||||
++ delt |= cal=sole-change :: input line change
|
||||
=^ cul say (remit:sole cal good) ::
|
||||
?~ cul (park:abet(p.eye buf.say) | ~) ::
|
||||
abet:beep:(emit det/u.cul) ::
|
||||
++ emit |= fec=sole-effect ^+ +> :: send effect
|
||||
+>(moz [[ost %diff %sole-effect fec] moz]) ::
|
||||
++ emil |= fex=(list sole-effect) :: send effects
|
||||
?~(fex +> $(fex t.fex, +> (emit i.fex))) ::
|
||||
++ good |=((list ,@c) -:(rose (tufa +<) come)) :: valid input
|
||||
++ kick |= point :: move command
|
||||
=^ dud gam ~(m ~(at go gam) +<) ::
|
||||
?. dud abet:beep =+ mus=~(res go gam) ::
|
||||
(park:abet(gam ?^(mus *game gam)) %2 mus) ::
|
||||
++ line =^ cal say (transmit:sole set/p.eye) :: update command
|
||||
(emit %det cal) ::
|
||||
++ make =+ dur=(rust (tufa p.eye) come) ::
|
||||
?~ dur abet:beep ::
|
||||
(kick:line(p.eye ~) +.dur) ::
|
||||
++ mean |=((unit tape) ?~(+< +> (emit txt/+<+))) :: optional message
|
||||
++ play |= lev=?(%0 %1 %2) :: update by level
|
||||
?-(lev %0 +>, %1 line, %2 line:show:prom) ::
|
||||
++ plow |= [lev=?(%0 %1 %2) mus=(unit tape)] :: complete print
|
||||
abet:(mean:(play lev) mus) ::
|
||||
++ prom %^ emit %pro %& :- %acto :: update prompt
|
||||
": {~[(icon who.gam)]} to move (row/col): " ::
|
||||
++ rend (turn `wall`~(tab go gam) |=(tape txt/+<)) :: table print
|
||||
++ show (emit %mor rend) :: update board
|
||||
++ sole ~(. cs say) :: console library
|
||||
++ work |= act=sole-action :: console input
|
||||
?:(?=(%det -.act) (delt +.act) make) ::
|
||||
-- ::
|
||||
++ abet [(flop moz) .(moz ~)] :: resolve core
|
||||
++ flet |=(from ~(. et +< (~(got by q.eye) ost))) :: in old client
|
||||
++ fret |=(from ~(. et +< *sole-share)) :: in new client
|
||||
++ pals %+ turn (pale hid (prix /sole)) |= sink :: per console
|
||||
[[p=p.+< q=q.+<] r=(~(got by q.eye) p.+<)] ::
|
||||
++ park |= [lev=?(%0 %1 %2) mus=(unit tape)] :: general update
|
||||
=+ pals |- ^+ +>.^$ ?~ +< +>.^$ ::
|
||||
$(+< t.+<, +>.^$ (~(plow et i.+<) lev mus)) ::
|
||||
:: :: ::
|
||||
:::: :: :: events
|
||||
:: :: ::
|
||||
++ peer-sole :: console subscribe
|
||||
|= [from *] =< abet ::
|
||||
(plow:(fret +<-) %2 ~) ::
|
||||
++ poke-sole-action :: console input
|
||||
|= [from act=sole-action] =< abet ::
|
||||
(work:(flet +<-) act) ::
|
||||
++ prep |= [from old=(unit ,[(list move) axle])] :: initialize
|
||||
=< abet ?~ old +> =< (park %2 ~) ::
|
||||
+>(+<+ u.old) ::
|
||||
++ pull-sole :: disconnect console
|
||||
|= [from *] =< abet ::
|
||||
amok:(flet +<-) ::
|
||||
--
|
60
base/lib/oct1/core.hook
Normal file
60
base/lib/oct1/core.hook
Normal file
@ -0,0 +1,60 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/oct1/lib :: :: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo version
|
||||
/- *oct1 :: structures
|
||||
:: :: ::
|
||||
:::: :: :: semantics
|
||||
!: :: ::
|
||||
|%
|
||||
++ icon |=(? ?:(+< 'X' 'O')) :: display at
|
||||
++ bo :: per board
|
||||
|_ bud=board ::
|
||||
++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address
|
||||
++ get |=(point (bit (off +<))) :: get point
|
||||
++ jon a/(turn (gulf 0 9) |=(@ b/(bit +<))) :: to json
|
||||
++ off |=(point (add x (mul 3 y))) :: bitfield address
|
||||
++ set |=(point (con bud (bex (off +<)))) :: set point
|
||||
++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win
|
||||
(rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks
|
||||
-- ::
|
||||
++ go :: play from
|
||||
|_ [src=ship game] ::
|
||||
++ at |_ point :: per point
|
||||
++ g `game`+>+<+ :: game
|
||||
++ k &(!|(x o) ept) :: legal move
|
||||
++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move
|
||||
++ o (~(get bo boo) +<) :: old at o
|
||||
++ p .(boo (~(set bo boo) +<), q.sag `src) :: play at o
|
||||
++ t .(who !who) :: take turn
|
||||
++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view
|
||||
++ x (~(get bo box) +<) :: old at x
|
||||
++ y .(box (~(set bo box) +<), p.sag `src) :: play at x
|
||||
-- ::
|
||||
++ ept =+(own |(&(=(~ -) !=(oth `src)) =(`src -))) :: we can play
|
||||
++ inn +<+(aud ((stat ship) & src aud)) :: source in audience
|
||||
++ muy |= (list ship) ?~ +< +>+<+ :: many in audience
|
||||
$(+< t.+<, aud ((stat ship) & i.+< aud)) ::
|
||||
++ nam =+ ?: =(p.sag `src) ['=' (icon &) ~] :: print name
|
||||
?: =(q.sag `src) ['=' (icon |) ~] ::
|
||||
"" (welp (scow %p src) `tape`-) ::
|
||||
++ new +<+(boo 0, box 0, who &, sag [~ ~]) :: reset game
|
||||
++ oth own(who !who) :: who owns other turn
|
||||
++ out +<+(aud ((stat ship) | src aud)) :: source quit audience
|
||||
++ own ?:(who p.sag q.sag) :: who owns this turn
|
||||
++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result
|
||||
?: =(511 (con boo box)) ::
|
||||
`"tie :-(" ~ `"{<nam>} wins" ::
|
||||
++ row |= y=@ :- (add y '1') %- zing :: print row
|
||||
(turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) ::
|
||||
++ str =+ [own ~[(icon who)]] ^- tape :: print player
|
||||
?~(-< -> (scow %p u.-<)) ::
|
||||
++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table
|
||||
++ vew =- ?: =(~ -) ~ :(weld "[" - "]") :: print watchers
|
||||
=+ dow=(~(tap by aud)) |- ^- tape ::
|
||||
?~ dow ~ =+ mor=$(dow t.dow) ::
|
||||
:(weld nam(src p.i.dow) ?~(mor "" ", ") mor) ::
|
||||
++ voy =+ ~[(icon who)] %+ weld vew :: print prompt
|
||||
?.(ept " ({-}'s turn) " ": {-} (row/col): ")::
|
||||
--
|
||||
--
|
60
base/lib/oct2/core.hook
Normal file
60
base/lib/oct2/core.hook
Normal file
@ -0,0 +1,60 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/oct2/lib :: :: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo version
|
||||
/- *oct2 :: structures
|
||||
:: :: ::
|
||||
:::: :: :: semantics
|
||||
!: :: ::
|
||||
|%
|
||||
++ icon |=(? ?:(+< 'X' 'O')) :: display at
|
||||
++ bo :: per board
|
||||
|_ bud=board ::
|
||||
++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address
|
||||
++ get |=(point (bit (off +<))) :: get point
|
||||
++ jon a/(turn (gulf 0 9) |=(@ b/(bit +<))) :: to json
|
||||
++ off |=(point (add x (mul 3 y))) :: bitfield address
|
||||
++ set |=(point (con bud (bex (off +<)))) :: set point
|
||||
++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win
|
||||
(rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks
|
||||
-- ::
|
||||
++ go :: play from
|
||||
|_ [src=ship game] ::
|
||||
++ at |_ point :: per point
|
||||
++ g `game`+>+<+ :: game
|
||||
++ k &(!|(x o) ept) :: legal move
|
||||
++ m ?.(k [| g] [& g:t:?:(who y p)]) :: move
|
||||
++ o (~(get bo boo) +<) :: old at o
|
||||
++ p .(boo (~(set bo boo) +<), q.sag `src) :: play at o
|
||||
++ t .(who !who) :: take turn
|
||||
++ v ?:(x (icon &) ?:(o (icon |) '.')) :: view
|
||||
++ x (~(get bo box) +<) :: old at x
|
||||
++ y .(box (~(set bo box) +<), p.sag `src) :: play at x
|
||||
-- ::
|
||||
++ ept =+(own |(&(=(~ -) !=(oth `src)) =(`src -))) :: we can play
|
||||
++ inn +<+(aud ((stat ship) & src aud)) :: source in audience
|
||||
++ muy |= (list ship) ?~ +< +>+<+ :: many in audience
|
||||
$(+< t.+<, aud ((stat ship) & i.+< aud)) ::
|
||||
++ nam =+ ?: =(p.sag `src) ['=' (icon &) ~] :: print name
|
||||
?: =(q.sag `src) ['=' (icon |) ~] ::
|
||||
"" (welp (scow %p src) `tape`-) ::
|
||||
++ new +<+(boo 0, box 0, who &, sag [~ ~]) :: reset game
|
||||
++ oth own(who !who) :: who owns other turn
|
||||
++ out +<+(aud ((stat ship) | src aud)) :: source quit audience
|
||||
++ own ?:(who p.sag q.sag) :: who owns this turn
|
||||
++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result
|
||||
?: =(511 (con boo box)) ::
|
||||
`"tie :-(" ~ `"{<nam>} wins" ::
|
||||
++ row |= y=@ :- (add y '1') %- zing :: print row
|
||||
(turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) ::
|
||||
++ str =+ [own ~[(icon who)]] ^- tape :: print player
|
||||
?~(-< -> (scow %p u.-<)) ::
|
||||
++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table
|
||||
++ vew =- ?: =(~ -) ~ :(weld "[" - "]") :: print watchers
|
||||
=+ dow=(~(tap by aud)) |- ^- tape ::
|
||||
?~ dow ~ =+ mor=$(dow t.dow) ::
|
||||
:(weld nam(src p.i.dow) ?~(mor "" ", ") mor) ::
|
||||
++ voy =+ ~[(icon who)] %+ weld vew :: print prompt
|
||||
?.(ept " ({-}'s turn) " ": {-} (row/col): ")::
|
||||
--
|
||||
--
|
@ -1,8 +1,8 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/octo/lib :: :: dependencies
|
||||
:::: /hook/core/oct3/lib :: :: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo version
|
||||
/- *octo :: structures
|
||||
/- *oct3 :: structures
|
||||
:: :: ::
|
||||
:::: :: :: semantics
|
||||
!: :: ::
|
@ -1,5 +1,5 @@
|
||||
::
|
||||
:::: /hook/door/octo-move/mar
|
||||
:::: /hook/door/oct2-move/mar
|
||||
::
|
||||
/? 314
|
||||
!:
|
@ -1,9 +1,9 @@
|
||||
:: :: ::
|
||||
:::: /hook/door/octo-update/mar :::::: dependencies
|
||||
:::: /hook/door/oct2-update/mar :::::: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo
|
||||
/- *octo :: structures
|
||||
/+ octo :: libraries
|
||||
/- *oct2 :: structures
|
||||
/+ oct2 :: libraries
|
||||
!: :: ::
|
||||
:::: :: :: protocol
|
||||
:: :: ::
|
16
base/mar/oct3-move/door.hook
Normal file
16
base/mar/oct3-move/door.hook
Normal file
@ -0,0 +1,16 @@
|
||||
::
|
||||
:::: /hook/door/oct3-move/mar
|
||||
::
|
||||
/? 314
|
||||
!:
|
||||
::::
|
||||
::
|
||||
=+ point=,[x=@ y=@]
|
||||
|_ point
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ json (corl need (at ni ni ~):jo) :: reparse from %json
|
||||
++ noun point :: clam from %noun
|
||||
--
|
||||
--
|
34
base/mar/oct3-update/door.hook
Normal file
34
base/mar/oct3-update/door.hook
Normal file
@ -0,0 +1,34 @@
|
||||
:: :: ::
|
||||
:::: /hook/door/oct3-update/mar :::::: dependencies
|
||||
:: :: ::
|
||||
/? 310 :: arvo
|
||||
/- *oct3 :: structures
|
||||
/+ oct3 :: libraries
|
||||
!: :: ::
|
||||
:::: :: :: protocol
|
||||
:: :: ::
|
||||
|_ play :: game
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun play :: from %noun
|
||||
--
|
||||
++ grow :: convert to
|
||||
|%
|
||||
++ json ^- ^json :: to %json
|
||||
~! +>-<
|
||||
?: ?=(| +>-<)
|
||||
~! +>-<
|
||||
~! p
|
||||
s/(crip p)
|
||||
=+ she=|=(ship s/(scot %p +<))
|
||||
=+ hes=|=([ship *] (she +<-))
|
||||
%- jobe
|
||||
:~ who/s/?:(who.p %x %o)
|
||||
plx/?~(p.sag.p ~ (she u.p.sag.p))
|
||||
plo/?~(q.sag.p ~ (she u.q.sag.p))
|
||||
aud/a/(turn (~(tap by aud.p)) hes)
|
||||
box/~(jon bo box.p)
|
||||
boo/~(jon bo boo.p)
|
||||
==
|
||||
--
|
||||
--
|
Loading…
Reference in New Issue
Block a user