Hi! Here's another puzzle from my Merlin's Wide and Wonderful World of Mystical Magic series.
I post these puzzles in the hope that someone just might be interested in them as such. I am not a game creator.
remstart
-------------------------------------------------------
Puzzles from my Merlin's Wide and Wonderful
World of Mystical Magic series
***********************
Author: gearce - January 2007
***********************
This is Puzzle Number 11 from my Merlin's Wide and
Wonderful World of Mystical Magic series but without
all the bitmaps, images, special effects etc
-------------------------------------------------------
remend
` This command will hide the mouse pointer
hide mouse
` Set text style and size
set text font "arial"
set text size 16
set text to bold
th=text height("arial")
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Hello! My name is Merlin. Allow me to show you some "
message$=message$+"of my Mystical Magic with Puzzle Number 11 from my Wide "
message$=message$+"and Wonderful World of Mystical Magic series, but "
message$=message$+"without all the bitmaps, images, special effects etc. "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Hello! My name is Merlin. Allow me to show ")/2
across=320-tw:down=192
wide=across+text width("Hello! My name is Merlin. Allow me to show ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Start of programme
start:
` Clear screen
cls
` A small pause
wait 1000
` Set new text size
set text size 21
th=text height("arial")
` --------------------------------------------------
` Place 27 dominoes on screen
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"I will place a set of 27 dominoes on the screen "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("I will place a set of 27 dominoes on the screen ")/2
across=320-tw:down=420
wide=across+text width("I will place a set of 27 dominoes on the screen ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Go to subroutine to place dominoes
gosub dominoes
` A small pause
wait 1000
` Set new text style and size
set text font "arial"
set text size 21
set text to bold
th=text height("arial")
ink rgb(255,255,255),0
` Go to subroutine to block text
gosub blocktext
` A small pause
wait 1000
` Come here if no selection is made
noselection:
` --------------------------------------------------
` Choose any domino
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Choose any domino, remember it or write it down "
message$=message$+"and click on it "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Choose any domino, remember it ")/2
across=320-tw:down=420
wide=across+text width("Choose any domino, remember it ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` This command will show the mouse pointer
show mouse
` This command will set the mouse pointer
position mouse 320,441
` Go to subroutine to check selection
gosub checkselection
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Multiply one of the numbers by 5
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Multiply any one of the numbers by 5, "
message$=message$+"write down your answer and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("write down your answer and click mouse ")/2
across=320-tw:down=219
wide=across+text width("write down your answer and click mouse ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
`Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Add 7 to result
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Add 7 to the result, write down your answer "
message$=message$+"and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Add 7 to the result, write down your ")/2
across=320-tw:down=219
wide=across+text width("Add 7 to the result, write down your ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
`Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Multiply result by 2
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Multiply the result by 2, write down your "
message$=message$+"answer and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Multiply the result by 2, write down your ")/2
across=320-tw:down=219
wide=across+text width("Multiply the result by 2, write down your ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
`Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Add second number on domino and key answer
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Add the other number on the domino, and key in "
message$=message$+"your answer "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Add the other number on the domino, ")/2
across=320-tw:down=219
wide=across+text width("Add the other number on the domino, ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Set cursor
set cursor 365,244
` Input the result
input "> ";answer
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Here's the magic
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Now here's the magic ... Watch this "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Now here's the magic ... Watch this ")/2
across=320-tw:down=219
wide=across+text width("Now here's the magic ... Watch this ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` Go to subroutine to reveal mystical magic and ask play again
gosub reveal
` End of programme
the_end:
end
` ---------------------------------------------------------------------
` Functions
` ---------------------------------------------------------------------
` --------------------------------------------------
` Function to write words to screen
` --------------------------------------------------
function writewords(across,down,message$,tw,wide)
` Go through all the letters in the message
for t=1 to len(message$)
` Add one letter from message$ to nextword$
nextword$=nextword$+mid$(message$,t)
` Check if that letter is a space
if mid$(message$,t)=" "
` Check if the current across coordinate + the size of the
` word will go beyond the designated width
if across+text width(nextword$)>wide
` and if it does, reset across and increase down coordinates
across=320-tw
inc down,text height(nextword$)
endif
` Print the text
text across,down,nextword$
` Increase the across coordinate by the size of the word
inc across,text width(nextword$)
` Clear the current word to make a new word next loop
nextword$=""
` A small pause so you can see it working
wait 200
endif
next t
endfunction
` ---------------------------------------------------------------------
` Subroutines
` ---------------------------------------------------------------------
` --------------------------------------------------
` Subroutine to place dominoes
` --------------------------------------------------
dominoes:
` Set new text style and size
set text font "times new roman"
set text size 60
set text to bold
th=text height("times new roman")
tw=text width(".")
`-----------------------------
` Top row of dominoes
`-----------------------------
l=48:t=20:r=92:b=80
ink rgb(255,255,255),0
for x=1 to 9
inc l,50:inc r,50
box l,t,r,b
ink rgb(0,0,0),0
box l+1,t+1,r-1,b-1
ink rgb(255,255,255),0
box l,t+60,r,b+61
ink rgb(0,0,0),0
box l+1,t+61,r-1,b+60
ink rgb(255,255,255),0
`---------------------------
` Six-six domino
`---------------------------
if x=1
text 102,-15,"."
text 102+tw*2,-15,"."
text 102,6,"."
text 102+tw*2,6,"."
text 102,27,"."
text 102+tw*2,27,"."
`-------------------------
text 102,44,"."
text 102+tw*2,44,"."
text 102,65,"."
text 102+tw*2,65,"."
text 102,86,"."
text 102+tw*2,86,"."
endif
`---------------------------
` Six-five domino
`---------------------------
if x=2
text 152,-15,"."
text 152+tw*2,-15,"."
text 152,6,"."
text 152+tw*2,6,"."
text 152,27,"."
text 152+tw*2,27,"."
`-------------------------
text 152,44,"."
text 152+tw*2,44,"."
text 152+tw*1,65,"."
text 152,86,"."
text 152+tw*2,86,"."
endif
`---------------------------
` Six-four domino
`---------------------------
if x=3
text 202,-15,"."
text 202+tw*2,-15,"."
text 202,6,"."
text 202+tw*2,6,"."
text 202,27,"."
text 202+tw*2,27,"."
`-------------------------
text 202,44,"."
text 202+tw*2,44,"."
text 202,86,"."
text 202+tw*2,86,"."
endif
`---------------------------
` Six-three domino
`---------------------------
if x=4
text 252,-15,"."
text 252+tw*2,-15,"."
text 252,6,"."
text 252+tw*2,6,"."
text 252,27,"."
text 252+tw*2,27,"."
`-------------------------
text 252,44,"."
text 252+tw*1,65,"."
text 252+tw*2,86,"."
endif
`---------------------------
` Six-two domino
`---------------------------
if x=5
text 302,-15,"."
text 302+tw*2,-15,"."
text 302,6,"."
text 302+tw*2,6,"."
text 302,27,"."
text 302+tw*2,27,"."
`-------------------------
text 302,44,"."
text 302+tw*2,86,"."
endif
`---------------------------
` Six-one domino
`---------------------------
if x=6
text 352,-15,"."
text 352+tw*2,-15,"."
text 352,6,"."
text 352+tw*2,6,"."
text 352,27,"."
text 352+tw*2,27,"."
`-------------------------
text 352+tw*1,65,"."
endif
`---------------------------
` Six-blank domino
`---------------------------
if x=7
text 402,-15,"."
text 402+tw*2,-15,"."
text 402,6,"."
text 402+tw*2,6,"."
text 402,27,"."
text 402+tw*2,27,"."
endif
`---------------------------
` Five-five domino
`---------------------------
if x=8
text 452,-15,"."
text 452+tw*2,-15,"."
text 452+tw*1,6,"."
text 452,27,"."
text 452+tw*2,27,"."
`-------------------------
text 452,44,"."
text 452+tw*2,44,"."
text 452+tw*1,65,"."
text 452,86,"."
text 452+tw*2,86,"."
endif
`---------------------------
` Five-four domino
`---------------------------
if x=9
text 502,-15,"."
text 502+tw*2,-15,"."
text 502+tw*1,6,"."
text 502,27,"."
text 502+tw*2,27,"."
`-------------------------
text 502,44,"."
text 502+tw*2,44,"."
text 502,86,"."
text 502+tw*2,86,"."
endif
next x
`-----------------------------
` Second row of dominoes
`-----------------------------
l=48:t=154:r=92:b=214
ink rgb(255,255,255),0
for x=1 to 9
inc l,50:inc r,50
box l,t,r,b
ink rgb(0,0,0),0
box l+1,t+1,r-1,b-1
ink rgb(255,255,255),0
box l,t+60,r,b+61
ink rgb(0,0,0),0
box l+1,t+61,r-1,b+60
ink rgb(255,255,255),0
`---------------------------
` Five-three domino
`---------------------------
if x=1
text 102,119,"."
text 102+tw*2,119,"."
text 102+tw*1,140,"."
text 102,161,"."
text 102+tw*2,161,"."
`-------------------------
text 102,178,"."
text 102+tw*1,199,"."
text 102+tw*2,220,"."
endif
`---------------------------
` Five-two domino
`---------------------------
if x=2
text 152,119,"."
text 152+tw*2,119,"."
text 152+tw*1,140,"."
text 152,161,"."
text 152+tw*2,161,"."
`-------------------------
text 152,178,"."
text 152+tw*2,220,"."
endif
`---------------------------
` Five-one domino
`---------------------------
if x=3
text 202,119,"."
text 202+tw*2,119,"."
text 202+tw*1,140,"."
text 202,161,"."
text 202+tw*2,161,"."
`-------------------------
text 202+tw*1,199,"."
endif
`---------------------------
` Five-zero domino
`---------------------------
if x=4
text 252,119,"."
text 252+tw*2,119,"."
text 252+tw*1,140,"."
text 252,161,"."
text 252+tw*2,161,"."
endif
`---------------------------
` Four-four domino
`---------------------------
if x=5
text 302,119,"."
text 302+tw*2,119,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Four-three domino
`---------------------------
if x=6
text 352,119,"."
text 352+tw*2,119,"."
text 352,161,"."
text 352+tw*2,161,"."
`-------------------------
text 352,178,"."
text 352+tw*1,199,"."
text 352+tw*2,220,"."
endif
`---------------------------
` Four-two domino
`---------------------------
if x=7
text 402,119,"."
text 402+tw*2,119,"."
text 402,161,"."
text 402+tw*2,161,"."
`-------------------------
text 402,178,"."
text 402+tw*2,220,"."
endif
`---------------------------
` Four-one domino
`---------------------------
if x=8
text 452,119,"."
text 452+tw*2,119,"."
text 452,161,"."
text 452+tw*2,161,"."
`-------------------------
text 452+tw*1,199,"."
endif
`---------------------------
` Four-blank domino
`---------------------------
if x=9
text 502,119,"."
text 502+tw*2,119,"."
text 502,161,"."
text 502+tw*2,161,"."
endif
next x
`-----------------------------
` Third row of dominoes
`-----------------------------
l=48:t=288:r=92:b=348
ink rgb(255,255,255),0
for x=1 to 9
inc l,50:inc r,50
box l,t,r,b
ink rgb(0,0,0),0
box l+1,t+1,r-1,b-1
ink rgb(255,255,255),0
box l,t+60,r,b+61
ink rgb(0,0,0),0
box l+1,t+61,r-1,b+60
ink rgb(255,255,255),0
`---------------------------
` Three-three domino
`---------------------------
if x=1
text 102,253,"."
text 102+tw*1,274,"."
text 102+tw*2,295,"."
`-------------------------
text 102,312,"."
text 102+tw*1,333,"."
text 102+tw*2,354,"."
endif
`---------------------------
` Three-two domino
`---------------------------
if x=2
text 152,253,"."
text 152+tw*1,274,"."
text 152+tw*2,295,"."
`-------------------------
text 152,312,"."
text 152+tw*2,354,"."
endif
`---------------------------
` Three-one domino
`---------------------------
if x=3
text 202,253,"."
text 202+tw*1,274,"."
text 202+tw*2,295,"."
`-------------------------
text 202+tw*1,333,"."
endif
`---------------------------
` Three-blank domino
`---------------------------
if x=4
text 252,253,"."
text 252+tw*1,274,"."
text 252+tw*2,295,"."
endif
`---------------------------
` Two-two domino
`---------------------------
if x=5
text 302,253,"."
text 302+tw*2,295,"."
`-------------------------
text 302,312,"."
text 302+tw*2,354,"."
endif
`---------------------------
` Two-one domino
`---------------------------
if x=6
text 352,253,"."
text 352+tw*2,295,"."
`-------------------------
text 352+tw*1,333,"."
endif
`---------------------------
` Two-blank domino
`---------------------------
if x=7
text 402,253,"."
text 402+tw*2,295,"."
endif
`---------------------------
` One-one domino
`---------------------------
if x=8
text 452+tw*1,274,"."
`-------------------------
text 452+tw*1,333,"."
endif
`---------------------------
` One-blank domino
`---------------------------
if x=9
text 502+tw*1,274,"."
endif
next x
return
` -------------------------------------------------
` Subroutine to block text
` -------------------------------------------------
blocktext:
ink rgb(0,0,0),0
box 0,421,638,442
ink rgb(255,255,255),0
return
` -------------------------------------------------
` Subroutine to check for selection
` -------------------------------------------------
checkselection:
`Wait for mouse click
suspend for mouse
` If mouse button is pressed
x=mousex()
y=mousey()
` This command will hide the mouse pointer
hide mouse
`-------------------------
` First row of dominoes
`-------------------------
if (x>=99 and x<=141) and (y>=21 and y<=139)
selection=66
goto re_turn
endif
if (x>=149 and x<=191) and (y>=21 and y<=139)
selection=65
goto re_turn
endif
if (x>=199 and x<=241) and (y>=21 and y<=139)
selection=64
goto re_turn
endif
if (x>=249 and x<=291) and (y>=21 and y<=139)
selection=63
goto re_turn
endif
if (x>=299 and x<=341) and (y>=21 and y<=139)
selection=62
goto re_turn
endif
if (x>=349 and x<=391) and (y>=21 and y<=139)
selection=61
goto re_turn
endif
if (x>=399 and x<=441) and (y>=21 and y<=139)
selection=60
goto re_turn
endif
if (x>=449 and x<=491) and (y>=21 and y<=139)
selection=55
goto re_turn
endif
if (x>=499 and x<=541) and (y>=21 and y<=139)
selection=54
goto re_turn
endif
`-------------------------
` Second row of dominoes
`-------------------------
if (x>=99 and x<=141) and (y>=155 and y<=273)
selection=53
goto re_turn
endif
if (x>=149 and x<=191) and (y>=155 and y<=273)
selection=52
goto re_turn
endif
if (x>=199 and x<=241) and (y>=155 and y<=273)
selection=51
goto re_turn
endif
if (x>=249 and x<=291) and (y>=155 and y<=273)
selection=50
goto re_turn
endif
if (x>=299 and x<=341) and (y>=155 and y<=273)
selection=44
goto re_turn
endif
if (x>=349 and x<=391) and (y>=155 and y<=273)
selection=43
goto re_turn
endif
if (x>=399 and x<=441) and (y>=155 and y<=273)
selection=42
goto re_turn
endif
if (x>=449 and x<=491) and (y>=155 and y<=273)
selection=41
goto re_turn
endif
if (x>=499 and x<=541) and (y>=155 and y<=273)
selection=40
goto re_turn
endif
`-------------------------
` Third row of dominoes
`-------------------------
if (x>=99 and x<=141) and (y>=289 and y<=407)
selection=33
goto re_turn
endif
if (x>=149 and x<=191) and (y>=289 and y<=407)
selection=32
goto re_turn
endif
if (x>=199 and x<=241) and (y>=289 and y<=407)
selection=31
goto re_turn
endif
if (x>=249 and x<=291) and (y>=289 and y<=407)
selection=30
goto re_turn
endif
if (x>=299 and x<=341) and (y>=289 and y<=407)
selection=22
goto re_turn
endif
if (x>=349 and x<=391) and (y>=289 and y<=407)
selection=21
goto re_turn
endif
if (x>=399 and x<=441) and (y>=289 and y<=407)
selection=20
goto re_turn
endif
if (x>=449 and x<=491) and (y>=289 and y<=407)
selection=11
goto re_turn
endif
if (x>=499 and x<=541) and (y>=289 and y<=407)
selection=10
goto re_turn
endif
goto noselection
re_turn:
selection=selection
return
` -------------------------------------------------
` Subroutine to reveal mystical magic
` and ask play again
` -------------------------------------------------
` -------------------------------------------
` Reveal mystical magic ...
` -------------------------------------------
reveal:
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"You chose domino "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("You chose domino ")/2
across=320-tw:down=81
wide=across+text width("You chose domino ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Set new text style and size
set text font "times new roman"
set text size 60
set text to bold
th=text height("times new roman")
tw=text width(".")
` Determine domino chosen
domino=answer-14
domino$=str$(domino)
` Draw domino
l=298:t=154:r=342:b=214
ink rgb(255,255,255),0
box l,t,r,b
ink rgb(0,0,0),0
box l+1,t+1,r-1,b-1
ink rgb(255,255,255),0
box l,t+60,r,b+61
ink rgb(0,0,0),0
box l+1,t+61,r-1,b+60
ink rgb(255,255,255),0
`---------------------------
` Six-six domino
`---------------------------
if domino=66
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302,199,"."
text 302+tw*2,199,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Six-five domino
`---------------------------
if domino=65 or domino=56
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302+tw*1,199,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Six-four domino
`---------------------------
if domino=64 or domino=46
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Six-three domino
`---------------------------
if domino=63 or domino=36
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*1,199,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Six-two domino
`---------------------------
if domino=62 or domino=26
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Six-one domino
`---------------------------
if domino=61 or domino=16
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302+tw*1,199,"."
endif
`---------------------------
` Six-blank domino
`---------------------------
if domino=60 or domino=6
text 302,119,"."
text 302+tw*2,119,"."
text 302,140,"."
text 302+tw*2,140,"."
text 302,161,"."
text 302+tw*2,161,"."
endif
`---------------------------
` Five-five domino
`---------------------------
if domino=55
text 302,119,"."
text 302+tw*2,119,"."
text 302+tw*1,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302+tw*1,199,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Five-four domino
`---------------------------
if domino=54 or domino=45
text 302,119,"."
text 302+tw*2,119,"."
text 302+tw*1,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Five-three domino
`---------------------------
if domino=53 or domino=35
text 302,119,"."
text 302+tw*2,119,"."
text 302+tw*1,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*1,199,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Five-two domino
`---------------------------
if domino=52 or domino=25
text 302,119,"."
text 302+tw*2,119,"."
text 302+tw*1,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Five-one domino
`---------------------------
if domino=51 or domino=15
text 302,119,"."
text 302+tw*2,119,"."
text 302+tw*1,140,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302+tw*1,199,"."
endif
`---------------------------
` Five-blank domino
`---------------------------
if domino=50 or domino=5
text 302,119,"."
text 302+tw*2,119,"."
text 302+tw*1,140,"."
text 302,161,"."
text 302+tw*2,161,"."
endif
`---------------------------
` Four-four domino
`---------------------------
if domino=44
text 302,119,"."
text 302+tw*2,119,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,178,"."
text 302,220,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Four-three domino
`---------------------------
if domino=43 or domino=34
text 302,119,"."
text 302+tw*2,119,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*1,199,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Four-two domino
`---------------------------
if domino=42 or domino=24
text 302,119,"."
text 302+tw*2,119,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Four-one domino
`---------------------------
if domino=41 or domino=14
text 302,119,"."
text 302+tw*2,119,"."
text 302,161,"."
text 302+tw*2,161,"."
`-------------------------
text 302+tw*1,199,"."
endif
`---------------------------
` Four-blank domino
`---------------------------
if domino=40 or domino=4
text 302,119,"."
text 302+tw*2,119,"."
text 302,161,"."
text 302+tw*2,161,"."
endif
`---------------------------
` Three-three domino
`---------------------------
if domino=33
text 302,119,"."
text 302+tw*1,140,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*1,199,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Three-two domino
`---------------------------
if domino=32 or domino=23
text 302,119,"."
text 302+tw*1,140,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Three-one domino
`---------------------------
if domino=31 or domino=13
text 302,119,"."
text 302+tw*1,140,"."
text 302+tw*2,161,"."
`-------------------------
text 302+tw*1,199,"."
endif
`---------------------------
` Three-blank domino
`---------------------------
if domino=30 or domino=3
text 302,119,"."
text 302+tw*1,140,"."
text 302+tw*2,161,"."
endif
`---------------------------
` Two-two domino
`---------------------------
if domino=22
text 302,119,"."
text 302+tw*2,161,"."
`-------------------------
text 302,178,"."
text 302+tw*2,220,"."
endif
`---------------------------
` Two-one domino
`---------------------------
if domino=21 or domino=12
text 302,119,"."
text 302+tw*2,161,"."
`-------------------------
text 302+tw*1,199,"."
endif
`---------------------------
` Two-blank domino
`---------------------------
if domino=20 or domino=2
text 302,119,"."
text 302+tw*2,161,"."
endif
`---------------------------
` One-one domino
`---------------------------
if domino=11
text 302+tw*1,140,"."
`-------------------------
text 302+tw*1,199,"."
endif
`---------------------------
` One-blank domino
`---------------------------
if domino=10 or domino=0
text 302+tw*1,140,"."
endif
` A small pause
wait 1000
` -------------------------------------------
` ... and ask play again
` -------------------------------------------
` Set new text style and size
set text font "arial"
set text size 21
set text to bold
th=text height("arial")
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Correct? Thank you "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Correct? Thank you ")/2
across=320-tw:down=338
wide=across+text width("Correct? Thank you ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Play again Yes or No "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Play again Yes or No ")/2
across=320-tw:inc down,(th*1)
wide=across+text width("Play again Yes or No ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Left click mouse for YES - right click mouse for NO "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Left click mouse for YES - right click mouse for NO ")/2
across=320-tw:inc down,(th*1)
wide=across+text width("Left click mouse for YES - right click mouse for NO ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Until mouse is clicked
do
if mouseclick()=1
goto start
exit
endif
if mouseclick()=2
goto the_end
exit
endif
` End loop
Loop
return
Again, highlight the code, right click and copy into DBClassic.
Enjoy
gearce
LANG MAY YER LUM REEK