554_restaurant 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # restaurant
  2. <<<<<<< 554_restaurant
  3. if $ARGS[0] = 'start':
  4. =======
  5. if $ARGS[0]='start':
  6. >>>>>>> 554_restaurant
  7. $metka = $ARGS[0]
  8. $loc = $CURLOC
  9. cla
  10. *clr
  11. <<<<<<< 554_restaurant
  12. set minut += 5
  13. '<center><B><font color = maroon>Bank</font></B></center>'
  14. '<center><img src="images\etogame\bank.jpg"></center>'
  15. clr
  16. gs 'stat'
  17. fcolor = rgb(0,0,0)
  18. bcolor = rgb(255,255,255)
  19. LCOLOR = rgb(106,90,205)
  20. 'Working hours are from 9 to 21.'
  21. act 'QUIT':
  22. cla
  23. set minut += 5
  24. gt 'hall'
  25. end
  26. if hour >= 9 and hour <= 21: act 'Go to the bank': gt 'bank','1'
  27. =======
  28. set minut = minut + 5
  29. '<center><B><font color=maroon>Bank</font></B></center>'
  30. '<center><img src="pic/bank.jpg" ></center>'
  31. clr
  32. gs'stat'
  33. fcolor=rgb(0,0,0)
  34. bcolor=rgb(255,255,255)
  35. LCOLOR = rgb(106,90,205)
  36. 'Working hours 9 prior_to 21.'
  37. act 'GO_OUT':
  38. cla
  39. set minut = minut + 5
  40. gt'hall'
  41. end
  42. if hour >= 9 and hour <= 21:act 'Go to the bank':gt'bank','1'
  43. >>>>>>> 554_restaurant
  44. end
  45. <<<<<<< 554_restaurant
  46. if $ARGS[0] = '1':
  47. =======
  48. if $ARGS[0]='1':
  49. >>>>>>> 554_restaurant
  50. $metka = $ARGS[0]
  51. $loc = $CURLOC
  52. cla
  53. *clr
  54. <<<<<<< 554_restaurant
  55. set minut += 5
  56. '<center><B><font color = maroon>Bank</font></B></center>'
  57. '<center><img src="images\etogame\bank1.jpg"></center>'
  58. clr
  59. gs 'stat'
  60. fcolor = rgb(0,0,0)
  61. bcolor = rgb(255,255,255)
  62. LCOLOR = rgb(106,90,205)
  63. if bankfond > 0: 'Personal account <<bankfond>> rubles'
  64. act 'QUIT':
  65. cla
  66. set minut += 5
  67. gt 'restaurant','start'
  68. end
  69. if bankfond >= 0:
  70. act 'Put your money on personal account':
  71. cla
  72. set minut += 5
  73. kartaIN = input ("How much money you want to deposit into the account?")
  74. if kartaIN <= 0 or kartaIN > money:
  75. 'Invalid operation.'
  76. else
  77. set bankfond += kartaIN
  78. set money -= kartaIN
  79. 'You put into the account <<kartaIN>> rubles, now on your account <<bankfond>> rubles.'
  80. end
  81. act 'Move away': gt 'restaurant','1'
  82. end
  83. act 'Withdraw money from the personal account':
  84. cla
  85. set minut += 5
  86. kartaOUT = input ("How much money you want to withdraw from the account?")
  87. if kartaOUT <= 0 or kartaOUT > bankfond:
  88. 'Not correct operation.'
  89. else
  90. set bankfond -= kartaOUT
  91. set money += kartaOUT
  92. 'You debited <<kartaOUT>> rubles, now on your account <<bankfond>> rubles.'
  93. end
  94. act 'Move away': gt 'restaurant','1'
  95. end
  96. end
  97. =======
  98. set minut = minut + 5
  99. '<center><B><font color=maroon>Bank</font></B></center>'
  100. '<center><img src="pic/bank1.jpg" ></center>'
  101. clr
  102. gs'stat'
  103. fcolor=rgb(0,0,0)
  104. bcolor=rgb(255,255,255)
  105. LCOLOR = rgb(106,90,205)
  106. if bankfond > 0:'personal account <<bankfond>> RUB'
  107. act 'GO_OUT':
  108. cla
  109. set minut = minut + 5
  110. gt'restaurant','start'
  111. end
  112. if bankfond >= 0:
  113. act 'Put money into a personal account':
  114. cla
  115. set minut = minut + 5
  116. kartaIN = input ("How much money you want to deposit?")
  117. if kartaIN <= 0 or kartaIN > money:
  118. 'Incorrect operation.'
  119. else
  120. set bankfond = bankfond + kartaIN
  121. set money = money - kartaIN
  122. 'You put into the account <<kartaIN>> rubles, now in your account <<bankfond>> rubles.'
  123. end
  124. act 'move_away':gt'restaurant','1'
  125. end
  126. act 'Withdraw money from the personal account':
  127. cla
  128. set minut = minut + 5
  129. kartaOUT = input ("How much money you want to withdraw?")
  130. if kartaOUT <= 0 or kartaOUT > bankfond:
  131. 'Not correct operation.'
  132. else
  133. set bankfond = bankfond - kartaOUT
  134. set money = money + kartaOUT
  135. 'You have removed from the account <<kartaOUT>> rubles, now in your account <<bankfond>> rubles.'
  136. end
  137. act 'move_away':gt'restaurant','1'
  138. end
  139. end
  140. >>>>>>> 554_restaurant
  141. end
  142. --- restaurant ---------------------------------