Hacker News new | ask | show | jobs
by w4ffl35 1464 days ago
I'm not sure why my comment is getting downvoted.

I just gave it a test run. I have a function with this code:

  if (!card.IsFaceUp && !card.IsBlocked)
  {
    FlipTableauCard(card);
    card.SetIsBlocked(false);
    break;
  }
I then added this comment afterwards:

  // if the card is face up, flip it
And this is what copilot produced:

  if (card.IsFaceUp)
  {
    FlipTableauCard(card);
    card.SetIsBlocked(false);
  }
I'm pretty positive that is code generated based on my comment and the surrounding code.