%May not be the best coding, but it still works
%Nevermind, TERRIBLE coding
setscreen ("graphics:600;500;position:truemiddle;center;nobuttonbar;title:Matching Birthdays;offscreenonly")
var birth, birthgirls : int
var jan, feb, mar, apr, may, june, july, aug, sep, oct, nov, dec : int
var year, yeargirls : int
var font : int := Font.New ("arial:15:underline")
loop
colorback (10)
cls
%Randoms
randint (birth, 1, 31)
randint (year, 1, 12)
randint (birthgirls, 1, 31)
randint (yeargirls, 1, 12)
%Randoms
%Boys
if year = 1 then
locate (4, 10)
put "January"
end if
if year = 2 then
locate (4, 10)
put "February"
end if
if year = 3 then
locate (4, 10)
put "March"
end if
if year = 4 then
locate (4, 10)
put "April"
end if
if year = 5 then
locate (4, 10)
put "May"
end if
if year = 6 then
locate (4, 10)
put "June"
end if
if year = 7 then
locate (4, 10)
put "July"
end if
if year = 8 then
locate (4, 10)
put "August"
end if
if year = 9 then
locate (4, 10)
put "September"
end if
if year = 10 then
locate (4, 10)
put "October"
end if
if year = 11 then
locate (4, 10)
put "November"
end if
if year = 12 then
locate (4, 10)
put "December"
end if
%Boys
%%Girls
if yeargirls = 1 then
locate (4, 30)
put "January"
end if
if yeargirls = 2 then
locate (4, 30)
put "February"
end if
if yeargirls = 3 then
locate (4, 30)
put "March"
end if
if yeargirls = 4 then
locate (4, 30)
put "April"
end if
if yeargirls = 5 then
locate (4, 30)
put "May"
end if
if yeargirls = 6 then
locate (4, 30)
put "June"
end if
if yeargirls = 7 then
locate (4, 30)
put "July"
end if
if yeargirls = 8 then
locate (4, 30)
put "August"
end if
if yeargirls = 9 then
locate (4, 30)
put "September"
end if
if yeargirls = 10 then
locate (4, 30)
put "October"
end if
if yeargirls = 11 then
locate (4, 30)
put "November"
end if
if yeargirls = 12 then
locate (4, 30)
put "December"
end if
%%Girls
locate (7, 10)
put birth
locate (7, 30)
put birthgirls
locate (1, 1)
Font.Draw ("Boys", 0, maxy - 20, font, red)
Font.Draw ("Year", 0, maxy - 70, font, red)
Font.Draw ("Birth", 0, maxy - 120, font, red)
Font.Draw ("Girls", 210, maxy - 20, font, red)
Font.Draw ("Year", 210, maxy - 70, font, red)
Font.Draw ("Birth", 210, maxy - 120, font, red)
if birth = birthgirls and year = yeargirls then
exit %End Loop
end if
locate (1, 8)
delay (30)
View.Update
end loop
Font.Draw ("We Have a Match", 0, maxy - 320, font, red)
|