%%%Practise!%%%
setscreen ("graphics:200;300")
var choice: int %get choice to color
var num: int %pick number color
var c: int
var key : array char of boolean
c := 0
put "1 changes house."
put "2 changes door."
put "3 changes door window."
put "4 changes T L window."
put "5 changes T R wondow."
put "6 changes B R window."
put "7 changes top window."
put "8 changes EVERYTHING!."
put "9 = H E L P !."
put "Press SPACE to clear!."
put "0 --> Choose a color!."
Input.Pause
cls
loop
Input.KeyDown (key)
%House outlines
if key ('1') then
randint (c,1,99)
drawline (20,20,180,20,c) %bottom
drawline (20,20,20,180,c) %left
drawline (180,20,180,180,c) %right
drawline (20,180,180,180,c) %top
drawline (20,180,100,300,c) %roof left
drawline (100,300,180,180,c) %roof right
end if
%door
if key ('2') then
randint (c,1,99)
drawline (40,20,40,60,c) %left
drawline (40,60,60,60,c) %top
drawline (60,60,60,20,c) %right
drawoval (55,35,1,1,c) %handle
end if
%door window
if key ('3') then
randint (c,1,99)
drawline (45,45,55,45,c) %bottom
drawline (45,45,45,55,c) %left
drawline (45,55,55,55,c) %top
drawline (55,55,55,45,c) %right
end if
%Left top window
if key ('4') then
randint (c,1,99)
drawline (40,100,40,150,c) %left
drawline (40,150,90,150,c) %top
drawline (90,150,90,100,c) %right
drawline (40,100,90,100,c) %bottom
end if
%Right top window
if key ('5') then
randint (c,1,99)
drawline (111,100,111,150,c) %left
drawline (111,150,160,150,c) %top
drawline (160,150,160,100,c) %right
drawline (111,100,160,100,c) %bottom
end if
%Right bottom window
if key ('6') then
randint (c,1,99)
drawline (90,30,150,30,c) %bottom
drawline (90,30,90,60,c) %left
drawline (90,60,150,60,c) %top
drawline (150,60,150,30,c) %right
end if
%addict 'triangle' window
if key ('7') then
randint (c,1,99)
drawline (70,210,130,210,c) %bottom
drawline (70,210,100,250,c) %left
drawline (100,250,130,210,c) %right
end if
%CHANGES HOLE PICTURE AS 1!
if key ('8') then
loop
randint (c,1,99)
drawline (20,20,180,20,c)
drawline (20,20,20,180,c)
drawline (180,20,180,180,c)
drawline (20,180,180,180,c)
drawline (20,180,100,300,c)
drawline (100,300,180,180,c)
drawline (40,20,40,60,c)
drawline (40,60,60,60,c)
drawline (60,60,60,20,c)
drawoval (55,35,1,1,c)
drawline (45,45,55,45,c)
drawline (45,45,45,55,c)
drawline (45,55,55,55,c)
drawline (55,55,55,45,c)
drawline (40,100,40,150,c)
drawline (40,150,90,150,c)
drawline (90,150,90,100,c)
drawline (40,100,90,100,c)
drawline (111,100,111,150,c)
drawline (111,150,160,150,c)
drawline (160,150,160,100,c)
drawline (111,100,160,100,c)
drawline (90,30,150,30,c)
drawline (90,30,90,60,c)
drawline (90,60,150,60,c)
drawline (150,60,150,30,c)
drawline (70,210,130,210,c)
drawline (70,210,100,250,c)
drawline (100,250,130,210,c)
exit when hasch
end loop
cls
end if
%Help part!
if key ('9') then
cls
put "1 changes house."
put "2 changes door."
put "3 changes door window."
put "4 changes T L window."
put "5 changes T R wondow."
put "6 changes B R window."
put "7 changes top window."
put "8 changes EVERYTHING!."
put "9 = H E L P !."
put "Press SPACE to clear!."
put "0 --> Choose a color!."
Input.Pause
cls
end if
%Clearing screen
if key (' ') then
cls
end if
%Choose a color
if key ('0') then
cls
put "Hi, Color your house"
cls
loop
loop
put "Use number 1 - 225"
get num
cls
if num >= 1 and num <= 225 then
exit
end if
end loop
loop
put "Please choose which part you want that color"
put "1 for frame"
put "2 for door"
put "3 for door window"
put "4 for T L window"
put "5 for T R window"
put "6 for B R window"
put "7 for Addict window"
get choice
cls
if choice >= 1 and choice <=7 then
exit
end if
end loop
if choice = 1 then
drawline (20,20,180,20,num)
drawline (20,20,20,180,num)
drawline (180,20,180,180,num)
drawline (20,180,180,180,num)
drawline (20,180,100,300,num)
drawline (100,300,180,180,num)
end if
if choice = 2 then
drawline (40,20,40,60,num)
drawline (40,60,60,60,num)
drawline (60,60,60,20,num)
drawoval (55,35,1,1,num)
end if
if choice = 3 then
drawline (45,45,55,45,num)
drawline (45,45,45,55,num)
drawline (45,55,55,55,num)
drawline (55,55,55,45,num)
end if
if choice = 4 then
drawline (40,100,40,150,num)
drawline (40,150,90,150,num)
drawline (90,150,90,100,num)
drawline (40,100,90,100,num)
end if
if choice = 5 then
drawline (111,100,111,150,num)
drawline (111,150,160,150,num)
drawline (160,150,160,100,num)
drawline (111,100,160,100,num)
end if
if choice = 6 then
drawline (90,30,150,30,num)
drawline (90,30,90,60,num)
drawline (90,60,150,60,num)
drawline (150,60,150,30,num)
end if
if choice = 7 then
drawline (70,210,130,210,num)
drawline (70,210,100,250,num)
drawline (100,250,130,210,num)
end if
end loop
end if
Input.Pause
end loop
|