
-----------------------------------
jonathan101
Tue Jun 16, 2009 6:28 pm

My game for computer tech class
-----------------------------------
What is it you are trying to achieve?



What is the problem you are having?


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

nothing

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                      %
%   .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