99 Fläschchen voll Bier an der Wand ;-)

Previous topic - Next topic

WPShadow

Hey,

wieso ist da eigentlich GLBasic nicht vertreten?

http://99-bottles-of-beer.net/

Das müssen wir unbedingt nachholen.

Posten wir mal ein paar Codes und entscheiden, welcher der optimalste und kürzeste ist.

Was haltet ihr davon?

Grüße

W.
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Kitty Hello

Hatte ich schonmal geschrieben. Hm..

Code (glbasic) Select

// --------------------------------- //
// Project: 99Bottles
// Start: Monday, March 05, 2007
// IDE Version: 4.114

LOCAL fx%, fy%
LOCAL sx%, sy%

GETFONTSIZE fx, fy
GETSCREENSIZE sx, sy

LOCAL t$, t2$

WHILE TRUE
FOR scroll% = sy TO -sy-100*fy*4 STEP -1
FOR y%=1 TO 101
LOCAL x% = 101-y
SELECT x
CASE >1
t$ = x+" bottles of beer on the wall, "+x+" bottles of beer."
t2$ = "Take one down and pass it around, "+(x-1)+" bottles of beer on the wall."
CASE 1
t$ = "1 bottle of beer on the wall, 1 bottle of beer."
t2$ = "Take one down and pass it around, no more bottles of beer on the wall."
CASE 0
t$ = "No more bottles of beer on the wall, no more bottles of beer."
t2$ = "Go to the store and buy some more, 99 bottles of beer on the wall."
ENDSELECT

PRINT t$,  0, y*fy*4       +scroll
PRINT t2$, 0, y*fy*4 +fy*2 +scroll
NEXT
SHOWSCREEN
NEXT
WEND


WPShadow

#2
Ich stell's mal rein!  :good:

War das hier evtl. die Version?

http://99-bottles-of-beer.net/language-dings-game-basic-215.html
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est