Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post Posted: August 8th, 2017, 5:46 am 
 

Joined: July 29th, 2017, 7:10 am
Posts: 5
Whenever I run the program it works but their is only one poo in the top left corner when there are supposed to be three on the screen. Every time I run it the poo goes back to that same place.


Top 
 Profile  
Reply with quote  
 Post Posted: August 8th, 2017, 8:36 am 
User avatar

Joined: February 14th, 2017, 7:32 pm
Posts: 166
Quote:
Whenever I run the program it works but their is only one poo in the top left corner when there are supposed to be three on the screen.


Do your 3 Poos have different coordinates? It seems they've all defaulted to 0, 0. Maybe that's why it seems to only be one? I can't give you any more help as long as we can't see the source code, though.
(Either by github.com or by sending it through an attachment like Chili tells you to in one of the "Sticky" topics in the forum)

Quote:
Every time I run it the poo goes back to that same place.

I have a feeling there might be something wrong with how you initialized the Poo objects. Are you constructing them in the constructor?

Anyways, it'd be nice if you could send the source code so that we could have a look at it.


Top 
 Profile  
Reply with quote  
 Post Posted: August 8th, 2017, 9:17 pm 
 

Joined: July 29th, 2017, 7:10 am
Posts: 5
here is my solution in a rar file. Thanks for any help.


Attachments:
poogame with classes and encapulation, constructors, adding more poos to game.rar [7.11 MiB]
Downloaded 1 time
Top 
 Profile  
Reply with quote  
 Post Posted: August 9th, 2017, 3:08 am 
 

Joined: July 29th, 2017, 7:10 am
Posts: 5
never mind thanks @zadtho I figured it out. They were all equaling (0,0) for x and y. It was a simple expression mix up in my constructor.


Top 
 Profile  
Reply with quote  
 Post Posted: August 9th, 2017, 7:53 am 
User avatar

Joined: February 14th, 2017, 7:32 pm
Posts: 166
Thought I'd said that? :?:

Nonetheless good job on fixing that yourself!


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 5 posts ] 

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: