Thanks to "aai" I got this to work. However, as all the others before
it, it
Will repeat when used again.
dice =: (6 6 6#:12 145 157 185 197 215)<@:{"1 2(#:i.6){' o'
toss=: dice {~ 2 10 ?@$6
toss
----T---T---T---T---T---T---T---T---T---┐
│o o│o o│o o│o o│o │o │o o│o o│o o│o │
│ o │ │ o │o o│ o │ o │ │o o│ │ │
│o o│o o│o o│o o│ o│ o│o o│o o│o o│ o│
+---+---+---+---+---+---+---+---+---+---+
│o │ │ │o o│o │o o│o o│o o│o o│ │
│ o │ o │ o │ │ │ o │ o │ o │ o │ o │
│ o│ │ │o o│ o│o o│o o│o o│o o│ │
L---+---+---+---+---+---+---+---+---+----
toss
----T---T---T---T---T---T---T---T---T---┐
│o o│o o│o o│o o│o │o │o o│o o│o o│o │
│ o │ │ o │o o│ o │ o │ │o o│ │ │
│o o│o o│o o│o o│ o│ o│o o│o o│o o│ o│
+---+---+---+---+---+---+---+---+---+---+
│o │ │ │o o│o │o o│o o│o o│o o│ │
│ o │ o │ o │ │ │ o │ o │ o │ o │ o │
│ o│ │ │o o│ o│o o│o o│o o│o o│ │
L---+---+---+---+---+---+---+---+---+----
It is impressive the first time!
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Friday, December 02, 2011 6:25 AM
To: 'Programming forum'
Subject: Re: [Jprogramming] Turkey Roll - Challenge 2 Rich Text
I'm still stuck with getting this to run in j701jhs . At least I can get
the whole line to run before it gives an error:
dice =: (6 6 6#:12 145 157 185 197 215)<@:{"1 2 (#:i.6){'o') {~ 2 10 ?@$
6:
|spelling error
| toss =:
(dice =: (6 6 6#:12 145 157 185 197 215)<@:{"1 2 (#:i.6){'o') {~ 2 10 ?@$ 6:
| ^
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kip Murray
Sent: Friday, December 02, 2011 2:39 AM
To: Programming forum
Subject: Re: [Jprogramming] Turkey Roll - Challenge 2 Rich Text
I'll try not to hurt you, Henry. While you are not looking I'll replace
<@:{ by ([: < {) and ?@$ by ([: ? $) . It works! A truly remarkable
one-liner. Greetings from Kip
On 12/1/2011 6:00 PM, Henry Rich wrote:
> toss =: (dice =: (6 6 6#:12 145 157 185 197 215)<@:{"1 2 (#:i.6){'
> o') {~ 2 10 ?@$ 6:
> toss''
> +---+---+---+---+---+---+---+---+---+---+
> |o o|o o|o |o o|o o|o |o | |o o|o o|
> | | o | |o o| o | o | | o | | |
> |o o|o o| o|o o|o o| o| o| |o o|o o|
> +---+---+---+---+---+---+---+---+---+---+
> |o o|o |o o|o |o |o o|o |o o| |o o|
> |o o| o |o o| o | |o o| |o o| o |o o|
> |o o| o|o o| o| o|o o| o|o o| |o o|
> +---+---+---+---+---+---+---+---+---+---+
>
> Henry Rich, whose @ will be pried from his cold dead fingers
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm