-1

I have 4 buttons and I'm wondering is this possible to dynamically assign them onClick methods. Three of these buttons should have 'lose()' method and one of them should have 'win()' method. Every turn 'win()' method will be assigned to new button. The winning button has tag 'winner' and every new turn as like above tag is assigned to new button. What's the best sollution for this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
kaziutus
  • 138
  • 3
  • 10

1 Answers1

1

Yes, it can be done with lambda expressions! Take a look at this link and see if it helps

Henrique Sabino
  • 546
  • 3
  • 19