I think its 2D commands
remstart
EriK DiamonD
11/05/06
Hangman project b
remend
cls
rem basic game set up
title()
gallows()
rem build an array with 13 words.
rem three, four, and five letter words.
dim words$(12)
words$(0)="tim"
words$(1)="tea"
words$(2)="sea"
words$(3)="dog"
words$(4)="erik"
words$(5)="wait"
words$(6)="soon"
words$(7)="last"
words$(8)="smile"
words$(9)="bible"
words$(10)="sense"
words$(11)="scene"
words$(12)="xerox"
rem generated random number to get a random word from word list
randomize timer()
num = rnd(12)
Rem randomly selected words
Rword$ = words$(num)
rem display the contents of Rword$
print Rword$
print
rem Get the length of the word
lw = len(Rword$)
rem display correct number of spaces
if lw = 3
threespace()
else
if lw = 4
fourspace()
else
fivespace()
endif
endif
Rem Create a variable element array to contain the letters of the item
Rem selected. will use the value in space(lw) to determine the number
rem of elements within the array.
dim letters$(lw)
for c = 1 to lw
letters$(c) = mid$(Rword$,c)
next lw
input "guess ";guess$
while guess$<> "qq"
found = 0
for ctr = 1 to lw
if guess$ = letters$(ctr) and ctr = 1
pz1(guess$)
d = d + 1
found = 1
else
if guess$ = letters$(ctr) and ctr = 2
pz2(guess$)
d = d + 1
found = 1
else
if guess$ = letters$(ctr) and ctr = 3
pz3(guess$)
d = d + 1
found = 1
else
if guess$ = letters$(ctr) and ctr = 4
pz4(guess$)
d = d + 1
found = 1
else
if guess$ = letters$(ctr) and ctr = 5
pz5(guess$)
d = d + 1
found = 1
else
endif
endif
endif
endif
endif
next ctr
rem print the 'you win' message
if lw = d
cls
for c = 1 to 30
text rnd(580), rnd(400), "You Win!!"
next c
endif
if found = 0 and error = 0
head()
error = error + 1
else
if found = 0 and error = 1
body()
error = error + 1
else
if found = 0 and error = 2
larm()
error = error + 1
else
if found = 0 and error = 3
rarm()
error = error + 1
else
if found = 0 and error = 4
lleg()
error = error + 1
else
if found = 0 and error = 5
rleg()
error = error + 1
endif
endif
endif
endif
endif
endif
rem Print the 'you lose' message
if error = 6
cls
for c = 1 to 30
sleep 250
text rnd(580), rnd(400), "RIP!! Your word was "+ rword$+"."
next c
endif
input "guess ";guess$
endwhile
end
title()
wait key
gallows()
wait key
head()
wait key
body()
wait key
rleg()
wait key
lleg()
wait key
rarm()
wait key
larm()
wait key
threeSpace()
wait key
fourSpace()
wait key
fiveSpace()
wait key
outofhere()
wait key
end
rem define the font, size of title. Game tile name.
set text font "chiller"
set text size 50
ink rgb(202,255,112),0
text 220,50,"Hangman"
ink rgb(110,139,61),0
text 222,52,"Hangman"
set text size normal
ink rgb(205,38,38),0
endfunction
Rem draw the gallows
function gallows()
ink rgb(139,69,19),0
line 275,100,325,100
line 275,300,275,100
line 225,300,325,300
line 325,100,325,115
endfunction
rem draw the head
function head()
ink rgb(205,38,38),0
circle 325,130,15
endfunction
rem draw the body
function body()
ink rgb(205,38,38),0
line 325,145,325,200
endfunction
rem draw the left leg
function lleg()
ink rgb(205,38,38),0
line 310,250,325,200
endfunction
rem draw the right leg
function rleg()
line 340,250,325,200
endfunction
rem draw the right arm
function rarm()
ink rgb(205,38,38),0
line 325,150,350,175
endfunction
rem draw the left arm
function larm()
ink rgb(205,38,38),0
line 325,150,300,175
endfunction
rem create five spaces
function fiveSpace()
line 100,395,135,395
line 150,395,185,395
line 200,395,235,395
line 250,395,285,395
line 300,395,335,395
endfunction
rem create four spaces
function fourSpace()
line 100,395,135,395
line 150,395,185,395
line 200,395,235,395
line 250,395,285,395
endfunction
rem create three spaces
function threeSpace()
line 100,395,135,395
line 150,395,185,395
line 200,395,235,395
endfunction
rem create out of game message
function outofhere()
ink rgb(72,118,255),0
set text font "chiller"
set text size 100
text 50,150,"I am out of here!"
endfunction
Erik Diamond