© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
15 replies
someoneelse6077

❔ Can someone help me with my snake game?

Hi everyone reading this.

I’m pretty new to C#, so please go easy on me.

I have a snake-game (wpf), and the next level should have some kind of obstacle. So I made this for the next level. See picture please.

My problem now is that the apples that spawn with the Random Class might land on top of my obstacles. Is there anyway to make sure that they do not?

The other picture is the code for apples being spawned.

Would really appreciate help!
snake5.jpg
code.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

can someone help me with my abstract class
C#CC# / help
3y ago
can someone help me:(
C#CC# / help
2y ago
✅ Can someone help me with timer (blazor)
C#CC# / help
2y ago
✅ Can someone help me with asp.core
C#CC# / help
2y ago