Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2497 connectés 

 


 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  694  695  696  ..  1454  1455  1456  1457  1458  1459
Auteur Sujet :

blabla@web

n°1839796
nraynaud
lol
Posté le 18-01-2009 à 23:45:08  profilanswer
 

Reprise du message précédent :

mareek a écrit :


P.S. C'est la première fois que je vois un langage qui ne lève pas d'erreur sur une division par 0.


ça peut arriver, mais c'est pas super-pratique au quotidien quand même. Techniquement ça prolonge un peu de domaine de définition de certaines fonctions, mais il reste un paquet d'emmerdes quand même. Parce que 0/0 ça reste interdit (ils sais pas s'il doit mettre + ou - l'infini) et sqrt(-12) aussi.
 
d'autre part, quand tu présentent "+inf" à l'utilisateur, c'est assez rare que ça le rendre joyeux (même quand c'est techniquement exact). En particulier quand il a fait une faute de frappe il y a 3h dans un document complexe.


---------------
trainoo.com, c'est fini
mood
Publicité
Posté le 18-01-2009 à 23:45:08  profilanswer
 

n°1839925
___alt
Posté le 19-01-2009 à 13:13:52  profilanswer
 

FlorentG a écrit :

Mais quand va-t-on reconnaître la supprématie de QBasic


 

Code :
  1. '                         Q B a s i c   G o r i l l a s
  2. '
  3. '                   Copyright (C) Microsoft Corporation 1990
  4. '
  5. ' Your mission is to hit your opponent with the exploding banana
  6. ' by varying the angle and power of your throw, taking into account
  7. ' wind speed, gravity, and the city skyline.
  8. '
  9. ' Speed of this game is determined by the constant SPEEDCONST.  If the
  10. ' program is too slow or too fast adjust the "CONST SPEEDCONST = 500" line
  11. ' below.  The larger the number the faster the game will go.
  12. '
  13. ' To run this game, press Shift+F5.
  14. '
  15. ' To exit QBasic, press Alt, F, X.
  16. '
  17. ' To get help on a BASIC keyword, move the cursor to the keyword and press
  18. ' F1 or click the right mouse button.
  19. '
  20. 'Set default data type to integer for faster game play
  21. DEFINT A-Z
  22. 'Sub Declarations
  23. DECLARE SUB DoSun (Mouth)
  24. DECLARE SUB SetScreen ()
  25. DECLARE SUB EndGame ()
  26. DECLARE SUB Center (Row, Text$)
  27. DECLARE SUB Intro ()
  28. DECLARE SUB SparklePause ()
  29. DECLARE SUB GetInputs (Player1$, Player2$, NumGames)
  30. DECLARE SUB PlayGame (Player1$, Player2$, NumGames)
  31. DECLARE SUB DoExplosion (x#, y#)
  32. DECLARE SUB MakeCityScape (BCoor() AS ANY)
  33. DECLARE SUB PlaceGorillas (BCoor() AS ANY)
  34. DECLARE SUB UpdateScores (Record(), PlayerNum, Results)
  35. DECLARE SUB DrawGorilla (x, y, arms)
  36. DECLARE SUB GorillaIntro (Player1$, Player2$)
  37. DECLARE SUB Rest (t#)
  38. DECLARE SUB VictoryDance (Player)
  39. DECLARE SUB ClearGorillas ()
  40. DECLARE SUB DrawBan (xc#, yc#, r, bc)
  41. DECLARE FUNCTION Scl (n!)
  42. DECLARE FUNCTION GetNum# (Row, Col)
  43. DECLARE FUNCTION DoShot (PlayerNum, x, y)
  44. DECLARE FUNCTION ExplodeGorilla (x#, y#)
  45. DECLARE FUNCTION Getn# (Row, Col)
  46. DECLARE FUNCTION PlotShot (StartX, StartY, Angle#, Velocity, PlayerNum)
  47. DECLARE FUNCTION CalcDelay! ()
  48. 'Make all arrays Dynamic
  49. '$DYNAMIC
  50. 'User-Defined TYPEs
  51. TYPE XYPoint
  52.  XCoor AS INTEGER
  53.  YCoor AS INTEGER
  54. END TYPE
  55. 'Constants
  56. CONST SPEEDCONST = 500
  57. CONST TRUE = -1
  58. CONST FALSE = NOT TRUE
  59. CONST HITSELF = 1
  60. CONST BACKATTR = 0
  61. CONST OBJECTCOLOR = 1
  62. CONST WINDOWCOLOR = 14
  63. CONST SUNATTR = 3
  64. CONST SUNHAPPY = FALSE
  65. CONST SUNSHOCK = TRUE
  66. CONST RIGHTUP = 1
  67. CONST LEFTUP = 2
  68. CONST ARMSDOWN = 3
  69. 'Global Variables
  70. DIM SHARED GorillaX(1 TO 2)  'Location of the two gorillas
  71. DIM SHARED GorillaY(1 TO 2)
  72. DIM SHARED LastBuilding
  73. DIM SHARED pi#
  74. DIM SHARED LBan&(x), RBan&(x), UBan&(x), DBan&(x) 'Graphical picture of banana
  75. DIM SHARED GorD&(120)        'Graphical picture of Gorilla arms down
  76. DIM SHARED GorL&(120)        'Gorilla left arm raised
  77. DIM SHARED GorR&(120)        'Gorilla right arm raised
  78. DIM SHARED gravity#
  79. DIM SHARED Wind
  80. 'Screen Mode Variables
  81. DIM SHARED ScrHeight
  82. DIM SHARED ScrWidth
  83. DIM SHARED Mode
  84. DIM SHARED MaxCol
  85. 'Screen Color Variables
  86. DIM SHARED ExplosionColor
  87. DIM SHARED SunColor
  88. DIM SHARED BackColor
  89. DIM SHARED SunHit
  90. DIM SHARED SunHt
  91. DIM SHARED GHeight
  92. DIM SHARED MachSpeed AS SINGLE
  93.  DEF FnRan (x) = INT(RND(1) * x) + 1
  94.  DEF SEG = 0                         ' Set NumLock to ON
  95.  KeyFlags = PEEK(1047)
  96.  IF (KeyFlags AND 32) = 0 THEN
  97.    POKE 1047, KeyFlags OR 32
  98.  END IF
  99.  DEF SEG
  100.  GOSUB InitVars
  101.  Intro
  102.  GetInputs Name1$, Name2$, NumGames
  103.  GorillaIntro Name1$, Name2$
  104.  PlayGame Name1$, Name2$, NumGames
  105.  
  106.  DEF SEG = 0                         ' Restore NumLock state
  107.  POKE 1047, KeyFlags
  108.  DEF SEG
  109. END
  110. CGABanana:
  111.  'BananaLeft
  112.  DATA 327686, -252645316, 60
  113.  'BananaDown
  114.  DATA 196618, -1057030081, 49344
  115.  'BananaUp
  116.  DATA 196618, -1056980800, 63
  117.  'BananaRight
  118.  DATA 327686,  1010580720, 240
  119. EGABanana:
  120.  'BananaLeft
  121.  DATA 458758,202116096,471604224,943208448,943208448,943208448,471604224,202116096,0
  122.  'BananaDown
  123.  DATA 262153, -2134835200, -2134802239, -2130771968, -2130738945,8323072, 8323199, 4063232, 4063294
  124.  'BananaUp
  125.  DATA 262153, 4063232, 4063294, 8323072, 8323199, -2130771968, -2130738945, -2134835200,-2134802239
  126.  'BananaRight
  127.  DATA 458758, -1061109760, -522133504, 1886416896, 1886416896, 1886416896,-522133504,-1061109760,0
  128. InitVars:
  129.  pi# = 4 * ATN(1#)
  130.  'This is a clever way to pick the best graphics mode available
  131.  ON ERROR GOTO ScreenModeError
  132.  Mode = 9
  133.  SCREEN Mode
  134.  ON ERROR GOTO PaletteError
  135.  IF Mode = 9 THEN PALETTE 4, 0   'Check for 64K EGA
  136.  ON ERROR GOTO 0
  137.  MachSpeed = CalcDelay
  138.  IF Mode = 9 THEN
  139.    ScrWidth = 640
  140.    ScrHeight = 350
  141.    GHeight = 25
  142.    RESTORE EGABanana
  143.    REDIM LBan&(8), RBan&(8), UBan&(8), DBan&(8)
  144.    FOR i = 0 TO 8
  145.      READ LBan&(i)
  146.    NEXT i
  147.    FOR i = 0 TO 8
  148.      READ DBan&(i)
  149.    NEXT i
  150.    FOR i = 0 TO 8
  151.      READ UBan&(i)
  152.    NEXT i
  153.    FOR i = 0 TO 8
  154.      READ RBan&(i)
  155.    NEXT i
  156.    SunHt = 39
  157.  ELSE
  158.    ScrWidth = 320
  159.    ScrHeight = 200
  160.    GHeight = 12
  161.    RESTORE CGABanana
  162.    REDIM LBan&(2), RBan&(2), UBan&(2), DBan&(2)
  163.    REDIM GorL&(20), GorD&(20), GorR&(20)
  164.    FOR i = 0 TO 2
  165.      READ LBan&(i)
  166.    NEXT i
  167.    FOR i = 0 TO 2
  168.      READ DBan&(i)
  169.    NEXT i
  170.    FOR i = 0 TO 2
  171.      READ UBan&(i)
  172.    NEXT i
  173.    FOR i = 0 TO 2
  174.      READ RBan&(i)
  175.    NEXT i
  176.    MachSpeed = MachSpeed * 1.3
  177.    SunHt = 20
  178.  END IF
  179. RETURN
  180. ScreenModeError:
  181.  IF Mode = 1 THEN
  182.    CLS
  183.    LOCATE 10, 5
  184.    PRINT "Sorry, you must have CGA, EGA color, or VGA graphics to play GORILLA.BAS"
  185.    END
  186.  ELSE
  187.    Mode = 1
  188.    RESUME
  189.  END IF
  190. PaletteError:
  191.  Mode = 1            '64K EGA cards will run in CGA mode.
  192.  RESUME NEXT
  193. REM $STATIC
  194. 'CalcDelay:
  195. '  Checks speed of the machine.
  196. FUNCTION CalcDelay!
  197.  s! = TIMER
  198.  DO
  199.    i! = i! + 1
  200.  LOOP UNTIL TIMER - s! >= .5
  201.  CalcDelay! = i!
  202. END FUNCTION
  203. ' Center:
  204. '   Centers and prints a text string on a given row
  205. ' Parameters:
  206. '   Row - screen row number
  207. '   Text$ - text to be printed
  208. '
  209. SUB Center (Row, Text$)
  210.  Col = MaxCol \ 2
  211.  LOCATE Row, Col - (LEN(Text$) / 2 + .5)
  212.  PRINT Text$;
  213. END SUB
  214. ' DoExplosion:
  215. '   Produces explosion when a shot is fired
  216. ' Parameters:
  217. '   X#, Y# - location of explosion
  218. '
  219. SUB DoExplosion (x#, y#)
  220.  PLAY "MBO0L32EFGEFDC"
  221.  Radius = ScrHeight / 50
  222.  IF Mode = 9 THEN Inc# = .5 ELSE Inc# = .41
  223.  FOR c# = 0 TO Radius STEP Inc#
  224.    CIRCLE (x#, y#), c#, ExplosionColor
  225.  NEXT c#
  226.  FOR c# = Radius TO 0 STEP (-1 * Inc#)
  227.    CIRCLE (x#, y#), c#, BACKATTR
  228.    FOR i = 1 TO 100
  229.    NEXT i
  230.    Rest .005
  231.  NEXT c#
  232. END SUB
  233. ' DoShot:
  234. '   Controls banana shots by accepting player input and plotting
  235. '   shot angle
  236. ' Parameters:
  237. '   PlayerNum - Player
  238. '   x, y - Player's gorilla position
  239. '
  240. FUNCTION DoShot (PlayerNum, x, y)
  241.  'Input shot
  242.  IF PlayerNum = 1 THEN
  243.    LocateCol = 1
  244.  ELSE
  245.    IF Mode = 9 THEN
  246.      LocateCol = 66
  247.    ELSE
  248.      LocateCol = 26
  249.    END IF
  250.  END IF
  251.  LOCATE 2, LocateCol
  252.  PRINT "Angle:";
  253.  Angle# = GetNum#(2, LocateCol + 7)
  254.  LOCATE 3, LocateCol
  255.  PRINT "Velocity:";
  256.  Velocity = GetNum#(3, LocateCol + 10)
  257.  IF PlayerNum = 2 THEN
  258.    Angle# = 180 - Angle#
  259.  END IF
  260.  'Erase input
  261.  FOR i = 1 TO 4
  262.    LOCATE i, 1
  263.    PRINT SPACE$(30 \ (80 \ MaxCol));
  264.    LOCATE i, (50 \ (80 \ MaxCol))
  265.    PRINT SPACE$(30 \ (80 \ MaxCol));
  266.  NEXT
  267.  SunHit = FALSE
  268.  PlayerHit = PlotShot(x, y, Angle#, Velocity, PlayerNum)
  269.  IF PlayerHit = 0 THEN
  270.    DoShot = FALSE
  271.  ELSE
  272.    DoShot = TRUE
  273.    IF PlayerHit = PlayerNum THEN PlayerNum = 3 - PlayerNum
  274.    VictoryDance PlayerNum
  275.  END IF
  276. END FUNCTION
  277. ' DoSun:
  278. '   Draws the sun at the top of the screen.
  279. ' Parameters:
  280. '   Mouth - If TRUE draws "O" mouth else draws a smile mouth.
  281. '
  282. SUB DoSun (Mouth)
  283.  'set position of sun
  284.  x = ScrWidth \ 2: y = Scl(25)
  285.  'clear old sun
  286.  LINE (x - Scl(22), y - Scl(18))-(x + Scl(22), y + Scl(18)), BACKATTR, BF
  287.  'draw new sun:
  288.  'body
  289.  CIRCLE (x, y), Scl(12), SUNATTR
  290.  PAINT (x, y), SUNATTR
  291.  'rays
  292.  LINE (x - Scl(20), y)-(x + Scl(20), y), SUNATTR
  293.  LINE (x, y - Scl(15))-(x, y + Scl(15)), SUNATTR
  294.  LINE (x - Scl(15), y - Scl(10))-(x + Scl(15), y + Scl(10)), SUNATTR
  295.  LINE (x - Scl(15), y + Scl(10))-(x + Scl(15), y - Scl(10)), SUNATTR
  296.  LINE (x - Scl(8), y - Scl(13))-(x + Scl(8), y + Scl(13)), SUNATTR
  297.  LINE (x - Scl(8), y + Scl(13))-(x + Scl(8), y - Scl(13)), SUNATTR
  298.  LINE (x - Scl(18), y - Scl(5))-(x + Scl(18), y + Scl(5)), SUNATTR
  299.  LINE (x - Scl(18), y + Scl(5))-(x + Scl(18), y - Scl(5)), SUNATTR
  300.  'mouth
  301.  IF Mouth THEN  'draw "o" mouth
  302.    CIRCLE (x, y + Scl(5)), Scl(2.9), 0
  303.    PAINT (x, y + Scl(5)), 0, 0
  304.  ELSE           'draw smile
  305.    CIRCLE (x, y), Scl(8), 0, (210 * pi# / 180), (330 * pi# / 180)
  306.  END IF
  307.  'eyes
  308.  CIRCLE (x - 3, y - 2), 1, 0
  309.  CIRCLE (x + 3, y - 2), 1, 0
  310.  PSET (x - 3, y - 2), 0
  311.  PSET (x + 3, y - 2), 0
  312. END SUB
  313. 'DrawBan:
  314. '  Draws the banana
  315. 'Parameters:
  316. '  xc# - Horizontal Coordinate
  317. '  yc# - Vertical Coordinate
  318. '  r - rotation position (0-3). (  \_/  ) /-\
  319. '  bc - if TRUE then DrawBan draws the banana ELSE it erases the banana
  320. SUB DrawBan (xc#, yc#, r, bc)
  321. SELECT CASE r
  322.  CASE 0
  323.    IF bc THEN PUT (xc#, yc#), LBan&, PSET ELSE PUT (xc#, yc#), LBan&, XOR
  324.  CASE 1
  325.    IF bc THEN PUT (xc#, yc#), UBan&, PSET ELSE PUT (xc#, yc#), UBan&, XOR
  326.  CASE 2
  327.    IF bc THEN PUT (xc#, yc#), DBan&, PSET ELSE PUT (xc#, yc#), DBan&, XOR
  328.  CASE 3
  329.    IF bc THEN PUT (xc#, yc#), RBan&, PSET ELSE PUT (xc#, yc#), RBan&, XOR
  330. END SELECT
  331. END SUB
  332. 'DrawGorilla:
  333. '  Draws the Gorilla in either CGA or EGA mode
  334. '  and saves the graphics data in an array.
  335. 'Parameters:
  336. '  x - x coordinate of gorilla
  337. '  y - y coordinate of the gorilla
  338. '  arms - either Left up, Right up, or both down
  339. SUB DrawGorilla (x, y, arms)
  340.  DIM i AS SINGLE   ' Local index must be single precision
  341.  'draw head
  342.  LINE (x - Scl(4), y)-(x + Scl(2.9), y + Scl(6)), OBJECTCOLOR, BF
  343.  LINE (x - Scl(5), y + Scl(2))-(x + Scl(4), y + Scl(4)), OBJECTCOLOR, BF
  344.  'draw eyes/brow
  345.  LINE (x - Scl(3), y + Scl(2))-(x + Scl(2), y + Scl(2)), 0
  346.  'draw nose if ega
  347.  IF Mode = 9 THEN
  348.    FOR i = -2 TO -1
  349.      PSET (x + i, y + 4), 0
  350.      PSET (x + i + 3, y + 4), 0
  351.    NEXT i
  352.  END IF
  353.  'neck
  354.  LINE (x - Scl(3), y + Scl(7))-(x + Scl(2), y + Scl(7)), OBJECTCOLOR
  355.  'body
  356.  LINE (x - Scl(8), y + Scl(8))-(x + Scl(6.9), y + Scl(14)), OBJECTCOLOR, BF
  357.  LINE (x - Scl(6), y + Scl(15))-(x + Scl(4.9), y + Scl(20)), OBJECTCOLOR, BF
  358.  'legs
  359.  FOR i = 0 TO 4
  360.    CIRCLE (x + Scl(i), y + Scl(25)), Scl(10), OBJECTCOLOR, 3 * pi# / 4, 9 * pi# / 8
  361.    CIRCLE (x + Scl(-6) + Scl(i - .1), y + Scl(25)), Scl(10), OBJECTCOLOR, 15 * pi# / 8, pi# / 4
  362.  NEXT
  363.  'chest
  364.  CIRCLE (x - Scl(4.9), y + Scl(10)), Scl(4.9), 0, 3 * pi# / 2, 0
  365.  CIRCLE (x + Scl(4.9), y + Scl(10)), Scl(4.9), 0, pi#, 3 * pi# / 2
  366.  FOR i = -5 TO -1
  367.    SELECT CASE arms
  368.      CASE 1
  369.        'Right arm up
  370.        CIRCLE (x + Scl(i - .1), y + Scl(14)), Scl(9), OBJECTCOLOR, 3 * pi# / 4, 5 * pi# / 4
  371.        CIRCLE (x + Scl(4.9) + Scl(i), y + Scl(4)), Scl(9), OBJECTCOLOR, 7 * pi# / 4, pi# / 4
  372.        GET (x - Scl(15), y - Scl(1))-(x + Scl(14), y + Scl(28)), GorR&
  373.      CASE 2
  374.        'Left arm up
  375.        CIRCLE (x + Scl(i - .1), y + Scl(4)), Scl(9), OBJECTCOLOR, 3 * pi# / 4, 5 * pi# / 4
  376.        CIRCLE (x + Scl(4.9) + Scl(i), y + Scl(14)), Scl(9), OBJECTCOLOR, 7 * pi# / 4, pi# / 4
  377.        GET (x - Scl(15), y - Scl(1))-(x + Scl(14), y + Scl(28)), GorL&
  378.      CASE 3
  379.        'Both arms down
  380.        CIRCLE (x + Scl(i - .1), y + Scl(14)), Scl(9), OBJECTCOLOR, 3 * pi# / 4, 5 * pi# / 4
  381.        CIRCLE (x + Scl(4.9) + Scl(i), y + Scl(14)), Scl(9), OBJECTCOLOR, 7 * pi# / 4, pi# / 4
  382.        GET (x - Scl(15), y - Scl(1))-(x + Scl(14), y + Scl(28)), GorD&
  383.    END SELECT
  384.  NEXT i
  385. END SUB
  386. 'ExplodeGorilla:
  387. '  Causes gorilla explosion when a direct hit occurs
  388. 'Parameters:
  389. '  X#, Y# - shot location
  390. FUNCTION ExplodeGorilla (x#, y#)
  391.  YAdj = Scl(12)
  392.  XAdj = Scl(5)
  393.  SclX# = ScrWidth / 320
  394.  SclY# = ScrHeight / 200
  395.  IF x# < ScrWidth / 2 THEN PlayerHit = 1 ELSE PlayerHit = 2
  396.  PLAY "MBO0L16EFGEFDC"
  397.  FOR i = 1 TO 8 * SclX#
  398.    CIRCLE (GorillaX(PlayerHit) + 3.5 * SclX# + XAdj, GorillaY(PlayerHit) + 7 * SclY# + YAdj), i, ExplosionColor, , , -1.57
  399.    LINE (GorillaX(PlayerHit) + 7 * SclX#, GorillaY(PlayerHit) + 9 * SclY# - i)-(GorillaX(PlayerHit), GorillaY(PlayerHit) + 9 * SclY# - i), ExplosionColor
  400.  NEXT i
  401.  FOR i = 1 TO 16 * SclX#
  402.    IF i < (8 * SclX#) THEN CIRCLE (GorillaX(PlayerHit) + 3.5 * SclX# + XAdj, GorillaY(PlayerHit) + 7 * SclY# + YAdj), (8 * SclX# + 1) - i, BACKATTR, , , -1.57
  403.    CIRCLE (GorillaX(PlayerHit) + 3.5 * SclX# + XAdj, GorillaY(PlayerHit) + YAdj), i, i MOD 2 + 1, , , -1.57
  404.  NEXT i
  405.  FOR i = 24 * SclX# TO 1 STEP -1
  406.    CIRCLE (GorillaX(PlayerHit) + 3.5 * SclX# + XAdj, GorillaY(PlayerHit) + YAdj), i, BACKATTR, , , -1.57
  407.    FOR Count = 1 TO 200
  408.    NEXT
  409.  NEXT i
  410.  ExplodeGorilla = PlayerHit
  411. END FUNCTION
  412. 'GetInputs:
  413. '  Gets user inputs at beginning of game
  414. 'Parameters:
  415. '  Player1$, Player2$ - player names
  416. '  NumGames - number of games to play
  417. SUB GetInputs (Player1$, Player2$, NumGames)
  418.  COLOR 7, 0
  419.  CLS
  420.  LOCATE 8, 15
  421.  LINE INPUT "Name of Player 1 (Default = 'Player 1'): "; Player1$
  422.  IF Player1$ = "" THEN
  423.    Player1$ = "Player 1"
  424.  ELSE
  425.    Player1$ = LEFT$(Player1$, 10)
  426.  END IF
  427.  LOCATE 10, 15
  428.  LINE INPUT "Name of Player 2 (Default = 'Player 2'): "; Player2$
  429.  IF Player2$ = "" THEN
  430.    Player2$ = "Player 2"
  431.  ELSE
  432.    Player2$ = LEFT$(Player2$, 10)
  433.  END IF
  434.  DO
  435.    LOCATE 12, 56: PRINT SPACE$(25);
  436.    LOCATE 12, 13
  437.    INPUT "Play to how many total points (Default = 3)"; game$
  438.    NumGames = VAL(LEFT$(game$, 2))
  439.  LOOP UNTIL NumGames > 0 AND LEN(game$) < 3 OR LEN(game$) = 0
  440.  IF NumGames = 0 THEN NumGames = 3
  441.  DO
  442.    LOCATE 14, 53: PRINT SPACE$(28);
  443.    LOCATE 14, 17
  444.    INPUT "Gravity in Meters/Sec (Earth = 9.8)"; grav$
  445.    gravity# = VAL(grav$)
  446.  LOOP UNTIL gravity# > 0 OR LEN(grav$) = 0
  447.  IF gravity# = 0 THEN gravity# = 9.8
  448. END SUB
  449. 'GetNum:
  450. '  Gets valid numeric input from user
  451. 'Parameters:
  452. '  Row, Col - location to echo input
  453. FUNCTION GetNum# (Row, Col)
  454.  Result$ = ""
  455.  Done = FALSE
  456.  WHILE INKEY$ <> "": WEND   'Clear keyboard buffer
  457.  DO WHILE NOT Done
  458.    LOCATE Row, Col
  459.    PRINT Result$; CHR$(95); "    ";
  460.    Kbd$ = INKEY$
  461.    SELECT CASE Kbd$
  462.      CASE "0" TO "9"
  463.        Result$ = Result$ + Kbd$
  464.      CASE "."
  465.        IF INSTR(Result$, "." ) = 0 THEN
  466.          Result$ = Result$ + Kbd$
  467.        END IF
  468.      CASE CHR$(13)
  469.        IF VAL(Result$) > 360 THEN
  470.          Result$ = ""
  471.        ELSE
  472.          Done = TRUE
  473.        END IF
  474.      CASE CHR$(8)
  475.        IF LEN(Result$) > 0 THEN
  476.          Result$ = LEFT$(Result$, LEN(Result$) - 1)
  477.        END IF
  478.      CASE ELSE
  479.        IF LEN(Kbd$) > 0 THEN
  480.          BEEP
  481.        END IF
  482.      END SELECT
  483.  LOOP
  484.  LOCATE Row, Col
  485.  PRINT Result$; " ";
  486.  GetNum# = VAL(Result$)
  487. END FUNCTION
  488. 'GorillaIntro:
  489. '  Displays gorillas on screen for the first time
  490. '  allows the graphical data to be put into an array
  491. 'Parameters:
  492. '  Player1$, Player2$ - The names of the players
  493. '
  494. SUB GorillaIntro (Player1$, Player2$)
  495.  LOCATE 16, 34: PRINT "--------------"
  496.  LOCATE 18, 34: PRINT "V = View Intro"
  497.  LOCATE 19, 34: PRINT "P = Play Game"
  498.  LOCATE 21, 35: PRINT "Your Choice?"
  499.  DO WHILE Char$ = ""
  500.    Char$ = INKEY$
  501.  LOOP
  502.  IF Mode = 1 THEN
  503.    x = 125
  504.    y = 100
  505.  ELSE
  506.    x = 278
  507.    y = 175
  508.  END IF
  509.  SCREEN Mode
  510.  SetScreen
  511.  IF Mode = 1 THEN Center 5, "Please wait while gorillas are drawn."
  512.  VIEW PRINT 9 TO 24
  513.  IF Mode = 9 THEN PALETTE OBJECTCOLOR, BackColor
  514.  
  515.  DrawGorilla x, y, ARMSDOWN
  516.  CLS 2
  517.  DrawGorilla x, y, LEFTUP
  518.  CLS 2
  519.  DrawGorilla x, y, RIGHTUP
  520.  CLS 2
  521.  
  522.  VIEW PRINT 1 TO 25
  523.  IF Mode = 9 THEN PALETTE OBJECTCOLOR, 46
  524.  
  525.  IF UCASE$(Char$) = "V" THEN
  526.    Center 2, "Q B A S I C   G O R I L L A S"
  527.    Center 5, "             STARRING:               "
  528.    P$ = Player1$ + " AND " + Player2$
  529.    Center 7, P$
  530.    PUT (x - 13, y), GorD&, PSET
  531.    PUT (x + 47, y), GorD&, PSET
  532.    Rest 1
  533.    PUT (x - 13, y), GorL&, PSET
  534.    PUT (x + 47, y), GorR&, PSET
  535.    PLAY "t120o1l16b9n0baan0bn0bn0baaan0b9n0baan0b"
  536.    Rest .3
  537.    PUT (x - 13, y), GorR&, PSET
  538.    PUT (x + 47, y), GorL&, PSET
  539.    PLAY "o2l16e-9n0e-d-d-n0e-n0e-n0e-d-d-d-n0e-9n0e-d-d-n0e-"
  540.    Rest .3
  541.    PUT (x - 13, y), GorL&, PSET
  542.    PUT (x + 47, y), GorR&, PSET
  543.    PLAY "o2l16g-9n0g-een0g-n0g-n0g-eeen0g-9n0g-een0g-"
  544.    Rest .3
  545.    PUT (x - 13, y), GorR&, PSET
  546.    PUT (x + 47, y), GorL&, PSET
  547.    PLAY "o2l16b9n0baan0g-n0g-n0g-eeen0o1b9n0baan0b"
  548.    Rest .3
  549.    FOR i = 1 TO 4
  550.      PUT (x - 13, y), GorL&, PSET
  551.      PUT (x + 47, y), GorR&, PSET
  552.      PLAY "T160O0L32EFGEFDC"
  553.      Rest .1
  554.      PUT (x - 13, y), GorR&, PSET
  555.      PUT (x + 47, y), GorL&, PSET
  556.      PLAY "T160O0L32EFGEFDC"
  557.      Rest .1
  558.    NEXT
  559.  END IF
  560. END SUB
  561. 'Intro:
  562. '  Displays game introduction
  563. SUB Intro
  564.  SCREEN 0
  565.  WIDTH 80, 25
  566.  MaxCol = 80
  567.  COLOR 15, 0
  568.  CLS
  569.  Center 4, "Q B a s i c    G O R I L L A S"
  570.  COLOR 7
  571.  Center 6, "Copyright (C) Microsoft Corporation 1990"
  572.  Center 8, "Your mission is to hit your opponent with the exploding"
  573.  Center 9, "banana by varying the angle and power of your throw, taking"
  574.  Center 10, "into account wind speed, gravity, and the city skyline."
  575.  Center 11, "The wind speed is shown by a directional arrow at the bottom"
  576.  Center 12, "of the playing field, its length relative to its strength."
  577.  Center 24, "Press any key to continue"
  578.  PLAY "MBT160O1L8CDEDCDL4ECC"
  579.  SparklePause
  580.  IF Mode = 1 THEN MaxCol = 40
  581. END SUB
  582. 'MakeCityScape:
  583. '  Creates random skyline for game
  584. 'Parameters:
  585. '  BCoor() - a user-defined type array which stores the coordinates of
  586. '  the upper left corner of each building.
  587. SUB MakeCityScape (BCoor() AS XYPoint)
  588.  x = 2
  589.  'Set the sloping trend of the city scape. NewHt is new building height
  590.  Slope = FnRan(6)
  591.  SELECT CASE Slope
  592.    CASE 1: NewHt = 15                 'Upward slope
  593.    CASE 2: NewHt = 130                'Downward slope
  594.    CASE 3 TO 5: NewHt = 15            '"V" slope - most common
  595.    CASE 6: NewHt = 130                'Inverted "V" slope
  596.  END SELECT
  597.  IF Mode = 9 THEN
  598.    BottomLine = 335                   'Bottom of building
  599.    HtInc = 10                         'Increase value for new height
  600.    DefBWidth = 37                     'Default building height
  601.    RandomHeight = 120                 'Random height difference
  602.    WWidth = 3                         'Window width
  603.    WHeight = 6                        'Window height
  604.    WDifV = 15                         'Counter for window spacing - vertical
  605.    WDifh = 10                         'Counter for window spacing - horizontal
  606.  ELSE
  607.    BottomLine = 190
  608.    HtInc = 6
  609.    NewHt = NewHt * 20 \ 35            'Adjust for CGA
  610.    DefBWidth = 18
  611.    RandomHeight = 54
  612.    WWidth = 1
  613.    WHeight = 2
  614.    WDifV = 5
  615.    WDifh = 4
  616.  END IF
  617.  CurBuilding = 1
  618.  DO
  619.    SELECT CASE Slope
  620.      CASE 1
  621.        NewHt = NewHt + HtInc
  622.      CASE 2
  623.        NewHt = NewHt - HtInc
  624.      CASE 3 TO 5
  625.        IF x > ScrWidth \ 2 THEN
  626.          NewHt = NewHt - 2 * HtInc
  627.        ELSE
  628.          NewHt = NewHt + 2 * HtInc
  629.        END IF
  630.      CASE 4
  631.        IF x > ScrWidth \ 2 THEN
  632.          NewHt = NewHt + 2 * HtInc
  633.        ELSE
  634.          NewHt = NewHt - 2 * HtInc
  635.        END IF
  636.    END SELECT
  637.    'Set width of building and check to see if it would go off the screen
  638.    BWidth = FnRan(DefBWidth) + DefBWidth
  639.    IF x + BWidth > ScrWidth THEN BWidth = ScrWidth - x - 2
  640.    'Set height of building and check to see if it goes below screen
  641.    BHeight = FnRan(RandomHeight) + NewHt
  642.    IF BHeight < HtInc THEN BHeight = HtInc
  643.    'Check to see if Building is too high
  644.    IF BottomLine - BHeight <= MaxHeight + GHeight THEN BHeight = MaxHeight + GHeight - 5
  645.    'Set the coordinates of the building into the array
  646.    BCoor(CurBuilding).XCoor = x
  647.    BCoor(CurBuilding).YCoor = BottomLine - BHeight
  648.    IF Mode = 9 THEN BuildingColor = FnRan(3) + 4 ELSE BuildingColor = 2
  649.    'Draw the building, outline first, then filled
  650.    LINE (x - 1, BottomLine + 1)-(x + BWidth + 1, BottomLine - BHeight - 1), BACKGROUND, B
  651.    LINE (x, BottomLine)-(x + BWidth, BottomLine - BHeight), BuildingColor, BF
  652.    'Draw the windows
  653.    c = x + 3
  654.    DO
  655.      FOR i = BHeight - 3 TO 7 STEP -WDifV
  656.        IF Mode <> 9 THEN
  657.          WinColr = (FnRan(2) - 2) * -3
  658.        ELSEIF FnRan(4) = 1 THEN
  659.          WinColr = 8
  660.        ELSE
  661.          WinColr = WINDOWCOLOR
  662.        END IF
  663.        LINE (c, BottomLine - i)-(c + WWidth, BottomLine - i + WHeight), WinColr, BF
  664.      NEXT
  665.      c = c + WDifh
  666.    LOOP UNTIL c >= x + BWidth - 3
  667.    x = x + BWidth + 2
  668.    CurBuilding = CurBuilding + 1
  669.  LOOP UNTIL x > ScrWidth - HtInc
  670.  LastBuilding = CurBuilding - 1
  671.  'Set Wind speed
  672.  Wind = FnRan(10) - 5
  673.  IF FnRan(3) = 1 THEN
  674.    IF Wind > 0 THEN
  675.      Wind = Wind + FnRan(10)
  676.    ELSE
  677.      Wind = Wind - FnRan(10)
  678.    END IF
  679.  END IF
  680.  'Draw Wind speed arrow
  681.  IF Wind <> 0 THEN
  682.    WindLine = Wind * 3 * (ScrWidth \ 320)
  683.    LINE (ScrWidth \ 2, ScrHeight - 5)-(ScrWidth \ 2 + WindLine, ScrHeight - 5), ExplosionColor
  684.    IF Wind > 0 THEN ArrowDir = -2 ELSE ArrowDir = 2
  685.    LINE (ScrWidth / 2 + WindLine, ScrHeight - 5)-(ScrWidth / 2 + WindLine + ArrowDir, ScrHeight - 5 - 2), ExplosionColor
  686.    LINE (ScrWidth / 2 + WindLine, ScrHeight - 5)-(ScrWidth / 2 + WindLine + ArrowDir, ScrHeight - 5 + 2), ExplosionColor
  687.  END IF
  688. END SUB
  689. 'PlaceGorillas:
  690. '  PUTs the Gorillas on top of the buildings.  Must have drawn
  691. '  Gorillas first.
  692. 'Parameters:
  693. '  BCoor() - user-defined TYPE array which stores upper left coordinates
  694. '  of each building.
  695. SUB PlaceGorillas (BCoor() AS XYPoint)
  696.    
  697.  IF Mode = 9 THEN
  698.    XAdj = 14
  699.    YAdj = 30
  700.  ELSE
  701.    XAdj = 7
  702.    YAdj = 16
  703.  END IF
  704.  SclX# = ScrWidth / 320
  705.  SclY# = ScrHeight / 200
  706.    
  707.  'Place gorillas on second or third building from edge
  708.  FOR i = 1 TO 2
  709.    IF i = 1 THEN BNum = FnRan(2) + 1 ELSE BNum = LastBuilding - FnRan(2)
  710.    BWidth = BCoor(BNum + 1).XCoor - BCoor(BNum).XCoor
  711.    GorillaX(i) = BCoor(BNum).XCoor + BWidth / 2 - XAdj
  712.    GorillaY(i) = BCoor(BNum).YCoor - YAdj
  713.    PUT (GorillaX(i), GorillaY(i)), GorD&, PSET
  714.  NEXT i
  715. END SUB
  716. 'PlayGame:
  717. '  Main game play routine
  718. 'Parameters:
  719. '  Player1$, Player2$ - player names
  720. '  NumGames - number of games to play
  721. SUB PlayGame (Player1$, Player2$, NumGames)
  722.  DIM BCoor(0 TO 30) AS XYPoint
  723.  DIM TotalWins(1 TO 2)
  724.  J = 1
  725.  
  726.  FOR i = 1 TO NumGames
  727.    
  728.    CLS
  729.    RANDOMIZE (TIMER)
  730.    CALL MakeCityScape(BCoor())
  731.    CALL PlaceGorillas(BCoor())
  732.    DoSun SUNHAPPY
  733.    Hit = FALSE
  734.    DO WHILE Hit = FALSE
  735.      J = 1 - J
  736.      LOCATE 1, 1
  737.      PRINT Player1$
  738.      LOCATE 1, (MaxCol - 1 - LEN(Player2$))
  739.      PRINT Player2$
  740.      Center 23, LTRIM$(STR$(TotalWins(1))) + ">Score<" + LTRIM$(STR$(TotalWins(2)))
  741.      Tosser = J + 1: Tossee = 3 - J
  742.      'Plot the shot.  Hit is true if Gorilla gets hit.
  743.      Hit = DoShot(Tosser, GorillaX(Tosser), GorillaY(Tosser))
  744.      'Reset the sun, if it got hit
  745.      IF SunHit THEN DoSun SUNHAPPY
  746.      IF Hit = TRUE THEN CALL UpdateScores(TotalWins(), Tosser, Hit)
  747.    LOOP
  748.    SLEEP 1
  749.  NEXT i
  750.  SCREEN 0
  751.  WIDTH 80, 25
  752.  COLOR 7, 0
  753.  MaxCol = 80
  754.  CLS
  755.  Center 8, "GAME OVER!"
  756.  Center 10, "Score:"
  757.  LOCATE 11, 30: PRINT Player1$; TAB(50); TotalWins(1)
  758.  LOCATE 12, 30: PRINT Player2$; TAB(50); TotalWins(2)
  759.  Center 24, "Press any key to continue"
  760.  SparklePause
  761.  COLOR 7, 0
  762.  CLS
  763. END SUB
  764. 'PlayGame:
  765. '  Plots banana shot across the screen
  766. 'Parameters:
  767. '  StartX, StartY - starting shot location
  768. '  Angle - shot angle
  769. '  Velocity - shot velocity
  770. '  PlayerNum - the banana thrower
  771. FUNCTION PlotShot (StartX, StartY, Angle#, Velocity, PlayerNum)
  772.  Angle# = Angle# / 180 * pi#  'Convert degree angle to radians
  773.  Radius = Mode MOD 7
  774.  InitXVel# = COS(Angle#) * Velocity
  775.  InitYVel# = SIN(Angle#) * Velocity
  776.  oldx# = StartX
  777.  oldy# = StartY
  778.  'draw gorilla toss
  779.  IF PlayerNum = 1 THEN
  780.    PUT (StartX, StartY), GorL&, PSET
  781.  ELSE
  782.    PUT (StartX, StartY), GorR&, PSET
  783.  END IF
  784.  
  785.  'throw sound
  786.  PLAY "MBo0L32A-L64CL16BL64A+"
  787.  Rest .1
  788.  'redraw gorilla
  789.  PUT (StartX, StartY), GorD&, PSET
  790.  adjust = Scl(4)                   'For scaling CGA
  791.  xedge = Scl(9) * (2 - PlayerNum)  'Find leading edge of banana for check
  792.  Impact = FALSE
  793.  ShotInSun = FALSE
  794.  OnScreen = TRUE
  795.  PlayerHit = 0
  796.  NeedErase = FALSE
  797.  StartXPos = StartX
  798.  StartYPos = StartY - adjust - 3
  799.  IF PlayerNum = 2 THEN
  800.    StartXPos = StartXPos + Scl(25)
  801.    direction = Scl(4)
  802.  ELSE
  803.    direction = Scl(-4)
  804.  END IF
  805.  IF Velocity < 2 THEN              'Shot too slow - hit self
  806.    x# = StartX
  807.    y# = StartY
  808.    pointval = OBJECTCOLOR
  809.  END IF
  810.    
  811.  DO WHILE (NOT Impact) AND OnScreen
  812.  
  813.  Rest .02
  814.  'Erase old banana, if necessary
  815.  IF NeedErase THEN
  816.    NeedErase = FALSE
  817.    CALL DrawBan(oldx#, oldy#, oldrot, FALSE)
  818.  END IF
  819.  x# = StartXPos + (InitXVel# * t#) + (.5 * (Wind / 5) * t# ^ 2)
  820.  y# = StartYPos + ((-1 * (InitYVel# * t#)) + (.5 * gravity# * t# ^ 2)) * (ScrHeight / 350)
  821.          
  822.  IF (x# >= ScrWidth - Scl(10)) OR (x# <= 3) OR (y# >= ScrHeight - 3) THEN
  823.    OnScreen = FALSE
  824.  END IF
  825.          
  826.  IF OnScreen AND y# > 0 THEN
  827.    'check it
  828.    LookY = 0
  829.    LookX = Scl(8 * (2 - PlayerNum))
  830.    DO
  831.      pointval = POINT(x# + LookX, y# + LookY)
  832.      IF pointval = 0 THEN
  833.        Impact = FALSE
  834.        IF ShotInSun = TRUE THEN
  835.          IF ABS(ScrWidth \ 2 - x#) > Scl(20) OR y# > SunHt THEN ShotInSun = FALSE
  836.        END IF
  837.      ELSEIF pointval = SUNATTR AND y# < SunHt THEN
  838.        IF NOT SunHit THEN DoSun SUNSHOCK
  839.        SunHit = TRUE
  840.        ShotInSun = TRUE
  841.      ELSE
  842.        Impact = TRUE
  843.      END IF
  844.      LookX = LookX + direction
  845.      LookY = LookY + Scl(6)
  846.    LOOP UNTIL Impact OR LookX <> Scl(4)
  847.    
  848.    IF NOT ShotInSun AND NOT Impact THEN
  849.      'plot it
  850.      rot = (t# * 10) MOD 4
  851.      CALL DrawBan(x#, y#, rot, TRUE)
  852.      NeedErase = TRUE
  853.    END IF
  854.            
  855.    oldx# = x#
  856.    oldy# = y#
  857.    oldrot = rot
  858.  END IF
  859.      
  860.  t# = t# + .1
  861.  LOOP
  862.  IF pointval <> OBJECTCOLOR AND Impact THEN
  863.    CALL DoExplosion(x# + adjust, y# + adjust)
  864.  ELSEIF pointval = OBJECTCOLOR THEN
  865.    PlayerHit = ExplodeGorilla(x#, y#)
  866.  END IF
  867.  PlotShot = PlayerHit
  868. END FUNCTION
  869. 'Rest:
  870. '  pauses the program
  871. SUB Rest (t#)
  872.  s# = TIMER
  873.  t2# = MachSpeed * t# / SPEEDCONST
  874.  DO
  875.  LOOP UNTIL TIMER - s# > t2#
  876. END SUB
  877. 'Scl:
  878. '  Pass the number in to scaling for cga.  If the number is a decimal, then we
  879. '  want to scale down for cga or scale up for ega.  This allows a full range
  880. '  of numbers to be generated for scaling.
  881. '  (i.e. for 3 to get scaled to 1, pass in 2.9)
  882. FUNCTION Scl (n!)
  883.  IF n! <> INT(n!) THEN
  884.      IF Mode = 1 THEN n! = n! - 1
  885.  END IF
  886.  IF Mode = 1 THEN
  887.      Scl = CINT(n! / 2 + .1)
  888.  ELSE
  889.      Scl = CINT(n!)
  890.  END IF
  891. END FUNCTION
  892. 'SetScreen:
  893. '  Sets the appropriate color statements
  894. SUB SetScreen
  895.  IF Mode = 9 THEN
  896.    ExplosionColor = 2
  897.    BackColor = 1
  898.    PALETTE 0, 1
  899.    PALETTE 1, 46
  900.    PALETTE 2, 44
  901.    PALETTE 3, 54
  902.    PALETTE 5, 7
  903.    PALETTE 6, 4
  904.    PALETTE 7, 3
  905.    PALETTE 9, 63       'Display Color
  906.  ELSE
  907.    ExplosionColor = 2
  908.    BackColor = 0
  909.    COLOR BackColor, 2
  910.  END IF
  911. END SUB
  912. 'SparklePause:
  913. '  Creates flashing border for intro and game over screens
  914. SUB SparklePause
  915.  COLOR 4, 0
  916.  A$ = "*    *    *    *    *    *    *    *    *    *    *    *    *    *    *    *    *    "
  917.  WHILE INKEY$ <> "": WEND 'Clear keyboard buffer
  918.  WHILE INKEY$ = ""
  919.    FOR A = 1 TO 5
  920.      LOCATE 1, 1                             'print horizontal sparkles
  921.      PRINT MID$(A$, A, 80);
  922.      LOCATE 22, 1
  923.      PRINT MID$(A$, 6 - A, 80);
  924.      FOR b = 2 TO 21                         'Print Vertical sparkles
  925.        c = (A + b) MOD 5
  926.        IF c = 1 THEN
  927.          LOCATE b, 80
  928.          PRINT "*";
  929.          LOCATE 23 - b, 1
  930.          PRINT "*";
  931.        ELSE
  932.          LOCATE b, 80
  933.          PRINT " ";
  934.          LOCATE 23 - b, 1
  935.          PRINT " ";
  936.        END IF
  937.      NEXT b
  938.    NEXT A
  939.  WEND
  940. END SUB
  941. 'UpdateScores:
  942. '  Updates players' scores
  943. 'Parameters:
  944. '  Record - players' scores
  945. '  PlayerNum - player
  946. '  Results - results of player's shot
  947. SUB UpdateScores (Record(), PlayerNum, Results)
  948.  IF Results = HITSELF THEN
  949.    Record(ABS(PlayerNum - 3)) = Record(ABS(PlayerNum - 3)) + 1
  950.  ELSE
  951.    Record(PlayerNum) = Record(PlayerNum) + 1
  952.  END IF
  953. END SUB
  954. 'VictoryDance:
  955. '  gorilla dances after he has eliminated his opponent
  956. 'Parameters:
  957. '  Player - which gorilla is dancing
  958. SUB VictoryDance (Player)
  959.  FOR i# = 1 TO 4
  960.    PUT (GorillaX(Player), GorillaY(Player)), GorL&, PSET
  961.    PLAY "MFO0L32EFGEFDC"
  962.    Rest .2
  963.    PUT (GorillaX(Player), GorillaY(Player)), GorR&, PSET
  964.    PLAY "MFO0L32EFGEFDC"
  965.    Rest .2
  966.  NEXT
  967. END SUB


---------------
TRIPS RIGHT BUNCH F SHUTTLE TOM AND JERRY RIGHT YELLOW
n°1839939
theredled
● REC
Posté le 19-01-2009 à 13:32:59  profilanswer
 

C'est beaucoup plus lisible avec un vrai IDE comme MS QBasic :o

 

Jme souviens plus c'est quoi ces # ces ! et ces & ? :D C'est pour dire le type nan ?


Message édité par theredled le 19-01-2009 à 13:34:33

---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1839940
masklinn
í dag viðrar vel til loftárása
Posté le 19-01-2009 à 13:34:04  profilanswer
 

http://elementiks.com/web_resources.php


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1839943
Shinuza
This is unexecpected
Posté le 19-01-2009 à 13:36:38  profilanswer
 

0x90 a écrit :


 
C'est un poil excessivement discret :/


J'avais meme pas vu a la premiere lecture  :sweat:


---------------
Mains power can kill, and it will hurt the entire time you’re dying from it.
n°1839999
omega2
Posté le 19-01-2009 à 14:50:42  profilanswer
 

___alt a écrit :


 

Code :
  1. '                         Q B a s i c   G o r i l l a s
  2. '
  3. '                   Copyright (C) Microsoft Corporation 1990
  4. '
  5. ' Your mission is to hit your opponent with the exploding banana
  6. ' by varying the angle and power of your throw, taking into account
  7. ' wind speed, gravity, and the city skyline.
  8. '
  9. ' Speed of this game is determined by the constant SPEEDCONST.  If the
  10. ' program is too slow or too fast adjust the "CONST SPEEDCONST = 500" line
  11. ' below.  The larger the number the faster the game will go.



J'ai viré tous les ragnagna.
Entre nous, si je veux jouer à worms, je lance worms [:airforceone] :
- on est pas limité à la banane
- on est pas obligé de régler la vitesse à la mimine en relançant le programme à chaque essai
- les graphismes sont beaucoup plus beau

n°1840001
gizmo
Posté le 19-01-2009 à 14:56:14  profilanswer
 

omega2 a écrit :

J'ai viré tous les ragnagna.
Entre nous, si je veux jouer à worms, je lance worms [:airforceone] :
- on est pas limité à la banane
- on est pas obligé de régler la vitesse à la mimine en relançant le programme à chaque essai
- les graphismes sont beaucoup plus beau


 
Tu nous rappelles vite-fait quand worms est sorti pour la premiere fois?

n°1840002
mareek
Et de 3 \o/
Posté le 19-01-2009 à 14:56:14  profilanswer
 

omega2 a écrit :

J'ai viré tous les ragnagna.
Entre nous, si je veux jouer à worms, je lance worms [:airforceone] :
- on est pas limité à la banane
- on est pas obligé de régler la vitesse à la mimine en relançant le programme à chaque essai
- les graphismes sont beaucoup plus beau


[:idee] ça viendrait donc de là !


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°1840004
FlorentG
Posté le 19-01-2009 à 14:58:55  profilanswer
 

omega2 a écrit :

J'ai viré tous les ragnagna....


Dixit le mec qui est né après 1995 et qui n'a pas connu l'époque QBasic :o

n°1840005
___alt
Posté le 19-01-2009 à 15:01:27  profilanswer
 

omega2 a écrit :

J'ai viré tous les ragnagna.
Entre nous, si je veux jouer à worms, je lance worms [:airforceone] :
- on est pas limité à la banane
- on est pas obligé de régler la vitesse à la mimine en relançant le programme à chaque essai
- les graphismes sont beaucoup plus beau

 

C'est donc toi l'homme qui vire les ragnagnas et qui ne te limite pas à la banane ? Tu réalises que pour les femmes tu es une sorte d'idéal ?  [:clooney14]

 
Spoiler :

Alors que pour nous, tu n'es simplement pas drôle  [:clooney8]


Message édité par ___alt le 19-01-2009 à 15:01:36

---------------
TRIPS RIGHT BUNCH F SHUTTLE TOM AND JERRY RIGHT YELLOW
mood
Publicité
Posté le 19-01-2009 à 15:01:27  profilanswer
 

n°1840008
masklinn
í dag viðrar vel til loftárása
Posté le 19-01-2009 à 15:07:01  profilanswer
 

omega2 a écrit :

J'ai viré tous les ragnagna.
Entre nous, si je veux jouer à worms, je lance worms [:airforceone] :
- on est pas limité à la banane
- on est pas obligé de régler la vitesse à la mimine en relançant le programme à chaque essai
- les graphismes sont beaucoup plus beau


Dwarf Fortress > you


Message édité par masklinn le 19-01-2009 à 15:07:20

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1840010
omega2
Posté le 19-01-2009 à 15:09:42  profilanswer
 

FlorentG a écrit :


Dixit le mec qui est né après 1995 et qui n'a pas connu l'époque QBasic :o

Bah, le Qbasic, c'est culcul la praline. Si on veut un vrai basic qui claque, c'était le GFABasic qu'il fallait choisir.

n°1840014
FlorentG
Posté le 19-01-2009 à 15:16:29  profilanswer
 

omega2 a écrit :

Bah, le Qbasic, c'est culcul la praline. Si on veut un vrai basic qui claque, c'était le GFABasic qu'il fallait choisir.


Arrête de tuer mon enfance :fou:

n°1840043
theredled
● REC
Posté le 19-01-2009 à 15:41:28  profilanswer
 

omega2 a écrit :

Bah, le Qbasic, c'est culcul la praline. Si on veut un vrai basic qui claque, c'était le GFABasic qu'il fallait choisir.


 :pfff:


---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840174
Skateinmar​s
Posté le 19-01-2009 à 19:14:50  profilanswer
 

___alt a écrit :


 

Code :
  1. '                         Q B a s i c   G o r i l l a s
  2. '
  3. '                   Copyright (C) Microsoft Corporation 1990
  4. '
  5. ' Your mission is to hit your opponent with the exploding banana
  6. ' by varying the angle and power of your throw, taking into account
  7. ' wind speed, gravity, and the city skyline.
  8. '
  9. ' Speed of this game is determined by the constant SPEEDCONST.  If the
  10. ' program is too slow or too fast adjust the "CONST SPEEDCONST = 500" line
  11. ' below.  The larger the number the faster the game will go.
  12. '



 
Mon premier jeu avec nibbles [:atsuko]


---------------
Feedback HAV
n°1840196
theredled
● REC
Posté le 19-01-2009 à 20:37:25  profilanswer
 

C'est possible de controler la fréquence de visite des moteurs de recherche, voire la fréquence du parcours des pages, ou des choses comme ça ?

 

Quand Google et Yahoo se mettent en même temps à demander de grosses requetes SQL, ça fait mal [:petrus75]

Message cité 1 fois
Message édité par theredled le 19-01-2009 à 20:37:38

---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840211
mareek
Et de 3 \o/
Posté le 19-01-2009 à 20:54:12  profilanswer
 

theredled a écrit :

C'est possible de controler la fréquence de visite des moteurs de recherche, voire la fréquence du parcours des pages, ou des choses comme ça ?
 
Quand Google et Yahoo se mettent en même temps à demander de grosses requetes SQL, ça fait mal [:petrus75]


http://www.conman.org/people/spc/r [...] quest-rate


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°1840214
theredled
● REC
Posté le 19-01-2009 à 21:00:05  profilanswer
 


Je vais mater ça, et j'ai vu aussi Crawl-delay.


---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840270
theredled
● REC
Posté le 20-01-2009 à 02:19:50  profilanswer
 

Leur forum a l'air mort, où est-ce que je pourrais trouver sur l'internet mondial des gens compétents sur l'orm Doctrine ?

Message cité 1 fois
Message édité par theredled le 20-01-2009 à 02:20:40

---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840313
theredled
● REC
Posté le 20-01-2009 à 09:55:27  profilanswer
 

[:mr couleur]


---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840398
mareek
Et de 3 \o/
Posté le 20-01-2009 à 12:21:04  profilanswer
 

Question à 10 000 action natixis (soit ~3 kopeks):
Si j'ai le code suivant:

Code :
  1. <div style="font-size:200%">
  2. <span style="font-size:8pt">Mon texte</span>
  3. </div>


 
Quelle sera la taille de mon texte ? 8pt ? 16pt ? 24pt ?


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°1840399
skeye
Posté le 20-01-2009 à 12:23:15  profilanswer
 

8pt, je dirais...non?[:petrus dei]


---------------
Can't buy what I want because it's free -
n°1840401
omega2
Posté le 20-01-2009 à 12:26:01  profilanswer
 

mareek a écrit :

Question à 10 000 action natixis (soit ~3 kopeks):
Si j'ai le code suivant:

Code :
  1. <div style="font-size:200%">
  2. <span style="font-size:8pt">Mon texte</span>
  3. </div>


 
Quelle sera la taille de mon texte ? 8pt ? 16pt ? 24pt ?

8pt : c'est toujours l'élément intérieur qui a le dernier mot.

n°1840409
theredled
● REC
Posté le 20-01-2009 à 13:12:23  profilanswer
 

Oui, et aussi les attribut se remplacent sans s'ajouter : on peut pas avoir à la fois 8pt ET 200%. Donc la 8pt est le plus fort, donc il gagne, c'est le rève américain.


---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840609
skeye
Posté le 20-01-2009 à 16:37:54  profilanswer
 

theredled a écrit :

Oui, et aussi les attribut se remplacent sans s'ajouter : on peut pas avoir à la fois 8pt ET 200%. Donc la 8pt est le plus fort, donc il gagne, c'est le rève américain.


euh, s'il met 8pt sur son div et 200% sur le span il va avoir 16pt, non?[:petrus dei]


---------------
Can't buy what I want because it's free -
n°1840611
theredled
● REC
Posté le 20-01-2009 à 16:42:40  profilanswer
 

skeye a écrit :


euh, s'il met 8pt sur son div et 200% sur le span il va avoir 16pt, non?[:petrus dei]


Oui, j'ai dit une connerie, mais j'étais déja dans le tram quand je m'en suis aperçu, de même qu'un width:100% sur une div, et pareil pour les em [:petrus75]
 
[:biiij][:haha fail]


---------------
Contes de fées en yaourt --- --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique
n°1840626
Skateinmar​s
Posté le 20-01-2009 à 16:57:34  profilanswer
 

Dites, personne a déjà utilisé acrobat pour faire un formulaire qui envoie ses données et des fichiers joints pour récupérer une réponse en xfdf qui modifie le PDF pour afficher un message de confirmation, le tout en Js ? :o


---------------
Feedback HAV
n°1840911
phosphorel​oaded
Posté le 20-01-2009 à 23:18:33  profilanswer
 

koskoz a écrit :

Salut tout le monde,
je me pose une petite question quant à l'intégration de deux images ayant rapport avec un seul titre :
 
http://hfr-rehost.net/http://self/ [...] 72bc4.jpeg
 
Comme procéderiez vous ?
Je pense partir sur une seul image (bonhomme et strilles), que je positionne autour du titre.


Soit tu crées une seule image qui se prolonge loin à droite et positionnée en left bottom, soit tu appliques 2 images (bonhomme en no-repeat et hachures en repeat-x) sur 2 éléments. C'était ça la question du WE?

Message cité 1 fois
Message édité par phosphoreloaded le 20-01-2009 à 23:18:57
n°1840928
Proov
Art & Science
Posté le 21-01-2009 à 00:13:17  profilanswer
 

ptain j'ai jamais vu un captcha aussi merdique... j'ai du ressayer au moins 15 fois avant que ça passe :fou:  
http://hfr-rehost.net/self/pic/c21bb3fa2d8d93166099e84d64c29f5eda3a2b86.jpeg
 
y'a pas des normes pour les Captcha ?

n°1840946
Ayuget
R.oger
Posté le 21-01-2009 à 09:14:13  profilanswer
 

Proov a écrit :

ptain j'ai jamais vu un captcha aussi merdique... j'ai du ressayer au moins 15 fois avant que ça passe :fou:  
http://hfr-rehost.net/http://self/ [...] a2b86.jpeg
 
y'a pas des normes pour les Captcha ?


Le pire c'est le captcha de rapidshare avec les chats à trouver sur les lettres, une vraie horreur :O
 
Bonus:
http://www.ghacks.net/wp-content/uploads/2008/05/rapidshare_captcha.jpg

n°1840988
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 21-01-2009 à 11:19:12  profilanswer
 

Proov a écrit :

y'a pas des normes pour les Captcha ?


Bin non, sinon les bots de spammers pourraient les suivre [:petrus75]
Après, on peut trouver des "best practices" qui regroupent bon sens et expérimentations bien testées, mais c'est à peu près tout.


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°1841116
mareek
Et de 3 \o/
Posté le 21-01-2009 à 14:22:36  profilanswer
 

http://research.microsoft.com/en-u [...] ts/asirra/  [:bien]


---------------
"I wonder if the internal negative pressure in self pumping toothpaste tubes is adjusted for different market altitudes." John Carmack
n°1841253
masklinn
í dag viðrar vel til loftárása
Posté le 21-01-2009 à 17:41:37  profilanswer
 

Pour ceux qui utilisent jquery et ont parfois du mal à débugger leurs chaines de commandes: http://jasonkarns.com/blog/2009/01 [...] ryfirebug/ :D


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1841259
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 21-01-2009 à 18:01:51  profilanswer
 

[:pingouino]
Yo dawg, we heard you like debugging Javascript, so we put a Javascript debugger in your Javascript so you can debug your Javascript while you debug your Javascript


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°1841260
ratibus
Posté le 21-01-2009 à 18:03:13  profilanswer
 

Tiens je viens de tomber sur le bug d'IE qui gère pas les cookies si le domaine contient un underscore  [:bluewaave]


---------------
Mon blog
n°1841262
drasche
Posté le 21-01-2009 à 18:25:15  profilanswer
 

ratibus a écrit :

Tiens je viens de tomber sur le bug d'IE qui gère pas les cookies si le domaine contient un underscore  [:bluewaave]


J'ai soudainement envie d'enregistrer un domaine avec un underscore dedans [:petrus75]


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°1841544
koskoz
They see me trollin they hatin
Posté le 22-01-2009 à 12:51:14  profilanswer
 

phosphoreloaded a écrit :


Soit tu crées une seule image qui se prolonge loin à droite et positionnée en left bottom, soit tu appliques 2 images (bonhomme en no-repeat et hachures en repeat-x) sur 2 éléments. C'était ça la question du WE?


 
Oui, c'était ça.
Mais du coup, le deuxième élément c'est quoi, un span vide ?


---------------
Twitter
n°1841548
Proov
Art & Science
Posté le 22-01-2009 à 12:56:45  profilanswer
 

Ayuget a écrit :


Le pire c'est le captcha de rapidshare avec les chats à trouver sur les lettres, une vraie horreur :O
 
Bonus:
http://www.ghacks.net/wp-content/u [...] aptcha.jpg


 
ptain ouai je m'en rappelle  [:pingouino] d'ailleurs, tout le monde est passé a rapidshare.com au lieu du .de avec ce captcha de merde
 

Taiche a écrit :


Bin non, sinon les bots de spammers pourraient les suivre [:petrus75]
Après, on peut trouver des "best practices" qui regroupent bon sens et expérimentations bien testées, mais c'est à peu près tout.


 
j'vé aller me renseigner sur ces best practices :jap:

n°1841626
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-01-2009 à 14:35:44  profilanswer
 

Proov a écrit :

j'vé aller me renseigner sur ces best practices :jap:


J'crois y a eu une discussion sur le sujet ici ; y avait aussi lorill qui fabriquait une soluce à base de "combien font deux et deux ?" :D


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°1842014
bixibu
Ca ... c'est fait!
Posté le 23-01-2009 à 14:27:39  profilanswer
 

Ya moyen d'insérer du son dans un site sans en payer les droits ou faire une demande d'autorisation à la sacem?
 
Je me rappel d'une durée légale maximum de quelques secondes, j'ai révé?
 
ps: épargnez moi le couplet c'est dla merde la zik dans les sites, je le sais bien :p

mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  694  695  696  ..  1454  1455  1456  1457  1458  1459

Aller à :
Ajouter une réponse
 

Sujets relatifs
blabla 3blabla 2
PUTAIN HARKO TU AS FERM2 BLABLA ![Beaucoup de blabla pour rien : post à effacer] Compiler .bat
variable1="blabla + variable2 +blala : c'est possible ??[PHP & regex] "blabla blabla file.ext?point=444 blabla" Recupérer 444
mail("celine@hotmail.com"," sujet","blabla"); pose une err ! Help[MySQL] WHERE 'blabla' compris dans le champ truc
[blabla@olympe] Le topic du modo, dieu de la fibre et du monde[PHP / BlaBla - limite]
Plus de sujets relatifs à : blabla@web


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)