Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 My game for computer tech class
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jonathan101




PostPosted: Tue Jun 16, 2009 6:28 pm   Post subject: My game for computer tech class

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<Answer Here>

every time the happy face covers the pic.file i want the pic to shink by -1
Describe what you have tried to solve this problem
<Answer Here>
nothing

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% .o88b. .d8b. d888888b .o88b. db db %
% d8P Y8 d8' `8b `~~88~~' d8P Y8 88 88 %
% 8P 88ooo88 88 8P 88ooo88 %
% 8b 88~~~88 88 8b 88~~~88 %
% Y8b d8 88 88 88 Y8b d8 88 88 %
% `Y88P' YP YP YP `Y88P' YP YP %
% %
% %
% d88888b d888888b d8b db d888b d88888b d8888b. .d8888. %
% 88' `88' 888o 88 88' Y8b 88' 88 `8D 88' YP %
% 88ooo 88 88V8o 88 88 88ooooo 88oobY' `8bo. %
% 88~~~ 88 88 V8o88 88 ooo 88~~~~~ 88`8b `Y8b. %
% 88 .88. 88 V888 88. ~8~ 88. 88 `88. db 8D %
% YP Y888888P VP V8P Y888P Y88888P 88 YD `8888Y' %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
View.Set ("graphics:1258;690")
% Variables
var picID := Pic.FileNew ("sam.jpg")
var random : int
var hit : int := 0
var missed : int := 0
var score : int := 0
var x, y,x1,y1, buttonnumber, buttonupdown : int
put " this game is to see how many times you miss the picture before you reach your goal of 3000 points"
put " get ready,click to start "


loop
color(white)
drawfillbox (0, 0, maxx, maxy, black)
put " number of times hit"
put hit
put "number of times missed"
put missed
put " current score"
put score
randint (x1, 200, 1268)
randint (y1, 0, 400)
Pic.Draw (picID, x1, y1, picCopy) % draws The picture

buttonwait ("down", x, y, buttonnumber, buttonupdown) % pops up a face where ever you click
drawfilloval (x, y, 140, 140, yellow) % Draws a yellow circle
drawfilloval (x - 50, y + 50, 30, 30, black) % Draws a eye for the face
drawfilloval (x + 50, y + 50, 30, 30, black) % Draws a second eye for the face
drawfilloval (x, y - 60, 90, 10, black) %draws a mouth for the face
if x>x1 and x < x1+100 and y>y1 and y<y1+100 then
hit := hit + 1
else
missed := missed + 1
end if
score := score + 150
delay (600)
cls
exit when score = 3000 % Closes game when score is 3000

end loop
put "your score is ", score, "."
put "you have missed the picture ", missed, " times."

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
jonathan101




PostPosted: Tue Jun 16, 2009 6:30 pm   Post subject: RE:My game for computer tech class

i also would like a timer to count up form 0 to what ever time it takes to miss the pic.file 5 times if its possible
rdrake




PostPosted: Tue Jun 16, 2009 6:37 pm   Post subject: RE:My game for computer tech class

I've removed your double posting. Please PM a mod in the future to have it removed if you do it by accident.
rdrake




PostPosted: Tue Jun 16, 2009 6:42 pm   Post subject: RE:My game for computer tech class

By the way, there's no need to vote to ban me just because I told you to follow the rules. Do it again and I lock your topic.

Just so you know.
jonathan101




PostPosted: Tue Jun 16, 2009 6:46 pm   Post subject: RE:My game for computer tech class

im new at this and i dont know how to delet my 2nd post i thought i only posted 1
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: