Mobile Universe

Programming for Android and iOS

Forum

Post Reply
Forum Home > Java development forum > Snake game; using the arraylist to store coordinates

finalfantasyfreak15
Member
Posts: 3

Hi,


I'm trying to make a snake game using Java.  I'm having trouble storing the coordinates for the snake's body pieces into an arraylist.  I can't get it to store coordinates that are shifted from each other by a certain amount.  Every time it stores, all the objects in the indexed locations are exactly the same.  Since I cannot paste my source code here cuz of the character limit, if anyone would rather take a look at it, I would be happy to send it through a message within the forum.



February 19, 2011 at 11:58 PM Flag Quote & Reply

Georgi Christov
Site Owner
Posts: 61

hey, I'll reply later in the day to try to help you. If you want you can send me the code so I can have a look at it :)

--

"My belief is stronger than your doubt"

February 21, 2011 at 7:51 AM Flag Quote & Reply

finalfantasyfreak15
Member
Posts: 3

Hi,


Thanks so much for agreeing to help me out!  I sent a message with my code pasted in.  I've been trying to look at other source code, but I just don't understand what it going on with other examples of snake..

February 21, 2011 at 1:11 PM Flag Quote & Reply

Georgi Christov
Site Owner
Posts: 61

Hi,

I read your e-mail and I was wondering whether what you've sent me is the whole code... Can you attach the .java file in the message instead? :)

--

"My belief is stronger than your doubt"

February 22, 2011 at 6:20 AM Flag Quote & Reply

finalfantasyfreak15
Member
Posts: 3

Oh it's alright!  I finally figured out what I was doing wrong.  But thanks so much! :3

February 25, 2011 at 11:49 PM Flag Quote & Reply

Georgi Christov
Site Owner
Posts: 61

No worries, I just couldn't see the whole source for some reason :)

--

"My belief is stronger than your doubt"

March 1, 2011 at 7:17 AM Flag Quote & Reply

You must login to post.