Ninja Kirby
✅ what is this? i dont know what to call this.
I'm making the game "simon" in winforms, and i ran into a 'problem'.
In my game class, there's 2 lists of integers, the event sequence (the one the player should input) and the player input (the one the player actually inputs.) Whenever the player clicks a corresponding button, I add that button's index to the player inputs list. However, I do this via a lambda expression within a for loop as shown here:
why is it that if I put i as the .Add() parameter, it's always 4, but not idx, which is always i anyway?
7 replies