urbit/gen/moon.hoon

20 lines
422 B
Plaintext
Raw Normal View History

2015-10-20 21:12:22 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/moon/gen
2015-10-20 21:12:22 +03:00
::
/? 310
2015-10-20 21:12:22 +03:00
::
::::
!:
:- %say
|= $: {now/@da eny/@uvI bec/beak}
2016-02-17 07:34:06 +03:00
$~
$~
2015-10-20 21:12:22 +03:00
==
:- %tang :_ ~ :- %leaf
=+ ran=(clan p.bec)
?: ?=({?($earl $pawn)} ran)
"can't create a moon from a {?:(?=($earl ran) "moon" "comet")}"
2015-10-20 21:12:22 +03:00
=+ mon=(mix (lsh 5 1 (end 5 1 eny)) p.bec)
=+ tic=.^(@ /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon))
"moon: {<`@p`mon>}; ticket: {<`@p`tic>}"