Author Topic: 99 Fläschchen voll Bier an der Wand ;-)  (Read 1337 times)

Offline WPShadow

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1667
    • View Profile
    • http://lostrevenant.blogspot.com
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10752
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 99 Fläschchen voll Bier an der Wand ;-)
« Reply #1 on: 2011-Jul-11 »
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

Offline WPShadow

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1667
    • View Profile
    • http://lostrevenant.blogspot.com
Re: 99 Fläschchen voll Bier an der Wand ;-)
« Reply #2 on: 2011-Jul-12 »
Ich stell's mal rein!  :good:

War das hier evtl. die Version?

http://99-bottles-of-beer.net/language-dings-game-basic-215.html
« Last Edit: 2011-Jul-12 by WPShadow »
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