mark5rockzz 0 Newbie Poster

I made a snake game using only its native language...I use the _getch() function to get whatever the user pressed and I used also the system("cls") to clear whenver the head of the snake moved. I actually made it move by the use of 2dim arrays but I have a problem locating position of the fruit(its location is generated by random function I made into it using the ctime library) I have an option to locate its position by adding the to axis of it but it has many similarities in the whole coordinate so when the head is near, the fruit then transfer into another location...I also dont know how to add a part onto snake's head...

just share

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.