i was adviced to ask the same question here so here is my link to stackoverflow: https://stackoverflow.com/questions/44240022/c-sharp-events-in-a-tic-tac-toe-game
and i copy my question as well ;)
I am new into coding and atmam trying to understand events what is an annoying stage but super important I guess. I just made a tic tac toeTic Tac Toe game and it is working but not really "beautiful" coded. I really have problems in using the events. well I am reading 3 different books, google is my best friend and I guess I red all the StackOverflow posts about events but the bulb in my head is never shining :P so I will give you boys a part of my code and I added some comments for the understanding:
the ui https://i.sstatic.net/6EBjf.pngThe UI:
I want to make it a bit more clearly here: I want all the functions run from the method above and not in each button event for itself
so my questions: 1. what do I have to dowant to make this workit a bit more clearly here: I want all the way i explained above to make 1functions run from the method above and not in each button event for all of my buttonsitself.
and it would be great if you boys could make a good story whyWhat do I have to use itdo to make this way and how it works so a brainless ape like me can understand the event stuff andwork the bulb will finally shine bright like a diamond :Pway I explained above to make one method for all of my buttons?