Post by ekvirtanen on Jul 30, 2009 11:31:51 GMT -5
runbasicnet.com:8023/seaside/go/runbasicpersonal?app=opendoors
Incase someone remembers what was that similar game somewhere back at early 80's, i would be happy to receive the information
Code is uglu-oldschool, but i made it to look like it in a purpose. Actually this was made with ChipMunkBasic for 50 lines competition at gamedesign.wikicomplete.info/
1 dim a(5)
2 for i = 1 to 5
3 a(i) = int(rnd(0) * 15)
4 next i
5 r = 15
6 d = 5
7 cls
8 print "Open the doors or you will die!!!!!" : print "Remake of a classic i dont remember well anymore ;(" : print "E.K.Virtanen 2009, http://e-k-v.wikidot.com/" : print "Public Domain" : print
9 print "There is 5 locked doors, what you must open in 15 time units."
10 print "You have pack of 15 keys, but no clue which key opens some door and what are useless ones."
11 print "Choose a key what you want to try, and if door opens with it, you move to next door."
12 print
13 print "Doors left to be opened: "; d
14 print "Time units left:"; r
15 input "Choose the key you want to try (1 - 15) or 0 to end? "; b : cls
16 if b = 0 then goto 99
17 if b < 0 or b > 15 then goto 55
18 if b = a(d) then goto 50
19 print "BAD LUCK!!! Key wont fit. You are wasting your time there..."
20 r = r -1
21 if r < d or r = 0 then goto 60
22 if b < a(d) then print "Try higher keynumber ;)"
23 goto 12
50 print "HOOOOOOORAY!!!!!! You opened that door."
51 d = d - 1
52 if d > 0 then goto 12
53 print "This is a miracle!!!! You actually survived!!!!!"
54 goto 99
55 print "You cant pick such a key jerk..."
56 goto 20
60 print "You cant win this one anymore..."
99 input "Want to quit? (Y / N)? "; c$
100 if upper$(c$) = "N" then goto 2
101 print "Bye"
102 end
Incase someone remembers what was that similar game somewhere back at early 80's, i would be happy to receive the information
Code is uglu-oldschool, but i made it to look like it in a purpose. Actually this was made with ChipMunkBasic for 50 lines competition at gamedesign.wikicomplete.info/