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

Username:   Password: 
 RegisterRegister   
 Don't hit Bob
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
upthescale




PostPosted: Wed Apr 12, 2006 10:16 pm   Post subject: Don't hit Bob

It's late and I sm going to bed, so the ending is messed up when you win, but try and get to fifty!
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Thu Apr 13, 2006 3:23 pm   Post subject: (No subject)

code:

        locate (2, 3)
        put "Score ", score
        locate (3, 3)
        put "Lives ", life


Change to:

code:

        locate (2, 3)
        put "Score ", score..
        locate (3, 3)
        put "Lives ", life..


Will solve your problem of having the top block temporarily hidden.
Now, haven't I told you before to use arrays? Seriously, your programme will be so much more efficient with them. Go read the Arrays tut if you still don't know what I'm talking about.

code:

proc bob
    Pic.ScreenLoad ("bob.jpg", 225, 225, picCopy)
end bob

Why Pic.ScreenLoad()? That's a little slow isn't it? Create a pic stream (you'll need Pic.FileNew()), then use Pic.Draw(). What could be easier?

code:

    randint (x, -20, 20)

In line with the wtd philosophy - if you're able to use a fcn instead of a proc for any task, then do so. The use of this will become apparent when you're trying to create an initialize complex sets of variables...or just when you're trying to edit them later on.
code:

   x := Rand.Int (-20, 20)


Why are you drawing each box individually, inserting a delay, then moving on? Draw them altogether (you'll obviously use an array now that you know about them) then update all at once.
You obviously know how to use View.Update(), so implement it into your main programme.

We appreciate submissions - but if you keep up with your bad habits you're really going to start getting flamed. More than usual at least.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: