[comp.windows.news] Tetris

beck@turner-joy.noarl.navy.mil (jeff beckleheimer) (09/12/90)

I recently installed OW 2.0 on my SS1+. To my dismay I soon
discovered that my favorite game Tetris was not included in the
demos. Is there a way to take the Tetris from OW 1.0.1 and make it
a standalone program which will run under OW 2.0?

Jeff Becklehimer
beck@noarl.navy.mil

bochner@lange.harvard.EDU (Harry Bochner) (09/13/90)

n
In article <1498@turner-joy.noarl.navy.mil>,
beck@turner-joy.noarl.navy.mil (jeff beckleheimer) writes:
 > I recently installed OW 2.0 on my SS1+. To my dismay I soon
 > discovered that my favorite game Tetris was not included in the
 > demos. Is there a way to take the Tetris from OW 1.0.1 and make it
 > a standalone program which will run under OW 2.0?

I saved the OW 1.0 tetris, but it produces the following under OW 2.0:
Stack: /KBMap marker 28479 /togglepause 28473 /restartgame 28470
/stopgame 28516
 /destroyframe 28498 /callhelp 28449 /setuptetris 28450 /setupquintis
28474 /tes
tall 8.0 array{7}
Executing: 'repeat'
At: Reading file(?,W,R)

Anyone know what's going on?

Harry Bochner
bochner@das.harvard.edu

ks@astra.ecn.purdue.edu (Kirk Smith) (09/13/90)

In article <4155@husc6.harvard.edu> bochner@lange.harvard.EDU (Harry Bochner) writes:
>n
>In article <1498@turner-joy.noarl.navy.mil>,
>beck@turner-joy.noarl.navy.mil (jeff beckleheimer) writes:
> > I recently installed OW 2.0 on my SS1+. To my dismay I soon
> > discovered that my favorite game Tetris was not included in the
> > demos. Is there a way to take the Tetris from OW 1.0.1 and make it
> > a standalone program which will run under OW 2.0?
>
>I saved the OW 1.0 tetris, but it produces the following under OW 2.0:
>
>Anyone know what's going on?
>

It would appear that the new NeWS is better about enforcing type checking.
Try these diffs:

350c350
< 	counttomark 2 div {
---
> 	counttomark 2 idiv {
365c365
< 	counttomark 2 div {
---
> 	counttomark 2 idiv {
601c601
< 	currenttime dup floor sub 200 mul floor {random pop} repeat
---
> 	currenttime dup floor sub 200 mul floor cvi {random pop} repeat
732c732
< 		    board exch get exch get	% xo yo val
---
> 		    board exch cvi get exch cvi get	% xo yo val
817c817
< 		board exch get exch curcolor put
---
> 		board exch get exch cvi curcolor put

					Kirk Smith

bochner@lange.harvard.EDU (Harry Bochner) (09/13/90)

Thanks to all those who sent the patches.

Harry Bochner
bochner@das.harvard.edu