#!/bin/sh # MetaCard 2.1 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" !œ Bouncy BallŒ‰h€*.ènumberofballs1 ballspeed473 U helvetica U helveticaU HelveticaU helveticaU helveticaW helveticaW helveticaU helvetica  P1local direction,maxpoints on openstack Answer " Bouncy Ball"&return&"Hit balls with Paddle to gain points. Lose points each time a ball bounces against the left wall." modal prefs newgame end openstack #starts a new game on newgame hide btn ball1 hide btn ball2 hide btn ball3 set the movespeed to the ballspeed of this stack lock messages repeat for each line a in the movingcontrols stop moving a end repeat unlock messages put 0 into field "p" get the numberofballs of this stack if it >= 1 then move btn ball1 from 301,189 to 452,189 without waiting show btn ball1 end if if it >=2 then move btn ball2 from 301,189 to 38,189 without waiting show btn ball2 end if if it is 3 then move btn ball3 from 301,189 to 452,189 without waiting show btn ball3 end if end newgame #check if ball hit anything and set it's new course of direction[theball] on movestopped put the target into theball put loc of theball into balloc switch #check if ball hit paddle first case (balloc is within the rect of btn "p1") put 5 into direction[theball] add 1 to fld p break case (balloc is within the rect of btn "pp1") if bottom of theball >= 372 then put 4 into direction else put 6 into direction[theball] add 1 to fld p break case (balloc is within the rect of btn "ppp1") if top of theball <= 27 then put 6 into direction else put 4 into direction[theball] add 1 to fld p break #if ball didn't hit paddle find out which wall it hit case (balloc is within -101,23,45,378) put random(3)+3 into direction[theball] if fld p is not 0 then subtract 1 from fld p break case (balloc is within 448,19,562,373) put random(3) into direction[theball] break case (balloc is within 0,-2,601,39) if direction[theball] is 4 then put 6 into direction[theball] else put 3 into direction[theball] break case (balloc is within 0,359,601,408) if direction[theball] is 6 then put 4 into direction[theball] else put 1 into direction[theball] break end switch # #move ball in new direction # switch direction[theball] case 1 put 27 - top of theball into a add round(a/3) to item 1 of balloc add a to item 2 of balloc if balloc is within -101,23,31,378 then get left of theball - 31 move theball relative 0-it,0 - (it*3) without waiting else move theball to balloc without waiting break case 2 move theball relative -416,0 without waiting break case 3 put 372 - bottom of theball into a subtract round(a/3) from item 1 of balloc add a to item 2 of balloc if balloc is within -101,23,31,378 then get left of theball - 31 move theball relative 0-it,it*3 without waiting else move theball to balloc without waiting break case 4 put 27 - top of theball into a subtract round(a/3) from item 1 of balloc add a to item 2 of balloc if balloc is within 461,19,562,373 then get 461 - right of theball move theball relative it,0-(it*3) without waiting else move theball to balloc without waiting break case 5 move theball relative + 416, 0 without waiting break case 6 put bottom of theball - 372 into a subtract round(a/3) from item 1 of balloc subtract a from item 2 of balloc if balloc is within 461,19,562,373 then get 461 - right of theball move theball relative it,it*3 without waiting else move theball to balloc without waiting break end switch if fld "p" is 25 then modal prefs answer "Congratulations! You're a Bouncy Ball Champion." newgame end if end movestopped #mouse tracking on mousemove put the mousev into y if y > 320 then put 320 into y if y < 80 then put 80 into y set loc of grp "player 1" to item 1 of the loc of grp "player 1",y end mousemove on mouseup modal prefs newgame end mouseup on closeStack repeat for each line a in the movingcontrols stop moving a end repeat end closeStack ËËËËè!š!~!…!†!™!€!‚!!ˆ!ƒ!!œ» @!~ball1ÀA i ÿÿqqH !ƒp)ÿÿÿwhiteèg  1  !…Restart@E y$on mouseUp openstack end mouseUp “ÿãe !†Quit@E yyon mouseUp answer "Are you sure?" with "Yes" or "No" if it = yes then domenu quit hypercard else idle end if end mouseUpyÿáe !‡ HC Iconsiÿÿÿÿ€ p×ball D *±À‚`‚ °‚ P‚ °‚ P‚ ‚À±*±À‚`‚ °‚ P‚ °‚ P‚ ‚À±)>pong D   ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚   ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ 3pong2 D@  à‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚  à‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ c°pong3 D`   ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚à  ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚ ‚à!ˆ player 1i™™àa!vp1A O ™™! !ypp1A O ™™ !  !zppp1A O ™™(à   !b1A oÿÿY! !€b2A oÿÿqY# !b3A oÿ™Šc !‚b4A oËeb !™ball2ÀAi ||üüH¡ï !šball3ÀAi ÿÿÿÿH`@ !œ ÿÿÿWhiteet= 7Copyright(C) Tuviah Snyder, 1999. All Rights Reserved.prefs pŠon openCard lock messages repeat for each line a in the movingcontrols stop moving a end repeat unlock messages end openCard uBlackffffffÿÿÿwhite€€€€€€©©© darkgray“±‰ UArialUArial W helveticaU helveticaU helveticaU helveticaê @‰ùþÿùOKàE«pÉon mouseUp set the ballspeed of stack "Bouncy ball" to thumbposition of scrollbar speed set the numberofballs of stack "Bouncy ball" to hilitedbutton of grp "balls" close this stack end mouseUp ^mL þspeedéaÿÿÝÝUÂ#è”UUUUU200500 ÿ W MoveSpeed:ballsI ÿÿÿÿY9•)1@FL_?*t ê 2@FLŒ?+u ê3@FL¸?0v ê  -@, Balls:çAnswer Dialog‰p’on resizeStack end resizeStack on openStack end openStack on preOpenCard end preOpenCard on openCard end openCard on closeCard end closeCard Ò¾NpU Helveticaê P ‡local strings, choices on preOpenStack local oldwidth, lastline, bwidth, twidth, iwidth, theight, curx put the answerDialogStrings into strings put the answerDialogChoices into choices put the number of lines in strings into lastline if lastline is 0 then put 1 into lastline if choices is empty then put 0 into choices subtract choices from lastline put line 1 to lastline of strings into field 1 add 2 to lastline put 32 into bwidth if choices is 0 then put "OK" after strings put 1 into choices end if if choices is 1 then set the icon of button "Icon" to 329 else set the icon of button "Icon" to 330 if choices > the number of buttons - 1 then put the number of buttons - 1 into choices repeat with i = 2 to choices + 1 show button i set the name of button i to line (choices - i + lastline) of strings set the width of button i to the formattedWidth of button i + 24 add the width of button i + 32 to bwidth end repeat set the dontWrap of field 1 to true put max(the formattedWidth of field 1 + 64, bwidth) into twidth if twidth > 600 then put 600 into twidth set the width of field 1 to twidth - 64 set the dontWrap of field 1 to false end if put the width of this stack into oldwidth set the width of this stack to twidth set the left of this stack to the left of this stack - (twidth - oldwidth) div 2 put the formattedHeight of field 1 + 68 into theight if theight > 400 then set the vScrollbar of field 1 to true put 400 into theight else set the vScrollbar of field 1 to false set the height of this stack to theight set the height of field 1 to theight - 68 set the top of button 1 to the height of field 1 div 2 - 12 set the topLeft of field 1 to 48, 8 put (twidth - bwidth) div (choices + 1) + 32 into iwidth put iwidth into curx set the default of button 2 to false repeat with i = choices + 1 down to 2 set the left of button i to round(curx) add the width of button i + iwidth to curx set the bottom of button i to the height of this stack - 16 end repeat set the default of button 2 to true end preOpenStack on closeStack repeat with i = 3 to the number of buttons hide button i end repeat end closeStack on mouseUp if the name of the target contains "button" then set answerDialogStrings to the short name of the target close this stack end if end mouseUp NpzîØÙÚÝÞßà î‰@0, P Bouncy Ball bHit balls with Paddle to gain points. Lose points each time a ball bounces against the left wall.ziconÀB Pon mouseUp end mouseUp  ,(I êØOKàL«`D/ êÙNoàD£`w40 êÚYesàD£` 47 êÝzàD£`÷4' êÞyàD£`°4' êßxàD£`i4' êàwàD£` 4) êò Moved Icons `' €€ ÿÿÿÿë @€€tí @€€uï @€€vñ @€€Jti372 Dÿÿÿÿÿÿ11 f•ƒ €‚0@‚DÀ  b‚F¸` `  ` ‚`¡€‚æƒxŽ^™ƒ€‚?À‚>ÿàÿðãøãü ÿøÿä ÿœ~| ¹üGü Ÿü_ü Ÿü_üŸø_à‚Ÿ€‚^ƒ’e•ƒ€‚?À‚Jÿàÿðÿøÿüÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿøÿàÿ€‚þƒxŽui373 Dÿÿÿÿÿÿ11 f•ƒ €‚0@‚DÀ  88b‚F¸` `  ` ‚`¡€‚æƒxŽ^™ƒ€‚?À‚>øàøðÿøÿü ÇøÇä ÿœ~| ¹üGü Ÿü_ü Ÿü_üŸø_à‚Ÿ€‚^ƒ’e•ƒ€‚?À‚Jÿàÿðÿøÿüÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿøÿàÿ€‚þƒxŽvi374 Dÿÿÿÿÿÿ11 g•ƒ €‚0@‚à‚? 88b‚F¸` `  ` ‚`¡€‚æƒxŽ^™ƒ€‚<@‚>ü`ÿðñøñü ÿøÇä Çœ~| ¹üGü Ÿü_ü Ÿü_üŸø_à‚Ÿ€‚^ƒ’e•ƒ€‚?À‚Jÿàÿðÿøÿüÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿøÿàÿ€‚þƒxŽJi330 Dÿÿÿÿÿÿffffff00 b‘ð‚ ƒƒƒ0ƒ ƒ ƒ ƒƒƒƒ`ƒ`‚€‚ƒƒƒƒ‡€‚ƒƒ’b•ð‚ø‚ø‚‚‚‚ ‚ƒƒƒƒƒƒx‚ð‚à‚€‚ƒ‹€‚€‚€‘\ž‚â‚‚‚‚‚ƒƒƒƒƒƒ ƒƒpƒÀƒ€‚€‡@ƒ@ƒ@‚À{‘ð‚ð‚ø‚ü‚?þ‚>‚<‚<‚ƒƒƒƒ~‚þ‚ü‚ø‚ð‚À‚€‚€‚€‚À‚À‚À‚À