fork download
  1. for (int i = 0; i < x + 10; i++)
  2. {
  3. for (int j = 0; j < x + 10; j++)
  4. {
  5. if ( (list[i][j].Text == "x" && list[i + 1][j].Text == "x" && list[i + 2][j].Text == "x" && list[i + 3][j].Text == "x" && list[i + 4][j].Text == "x")
  6. || (list[i][j].Text == "x" && list[i][j + 1].Text == "x" && list[i][j + 2].Text == "x" && list[i][j + 3].Text == "x" && list[i][j + 4].Text == "x")
  7. || (list[i][j].Text == "x" && list[i + 1][j + 1].Text == "x" && list[i + 2][j + 2].Text == "x" && list[i + 3][j + 3].Text == "x" && list[i + 4][j + 4].Text == "x")
  8. || (list[i][j].Text == "x" && list[i + 1][j + 1].Text == "x" && list[i + 2][j + 2].Text == "x" && list[i + 3][j + 3].Text == "x" && list[i + 4][j + 4].Text == "x")
  9. || (list[i][j].Text == "x" && list[i + 1][j - 1].Text == "x" && list[i + 2][j - 2].Text == "x" && list[i + 3][j - 3].Text == "x" && list[i + 4][j - 4].Text == "x"))
  10. {
  11. timer1.Enabled = false;
  12. Win winner = new Win();
  13. winner.StartPosition = FormStartPosition.CenterScreen;
  14. winner.Show();
  15. rex = true;
  16. winner.TxtBoxWin = "X WON!";
  17. scoreX++;
  18. scoreXtext = Convert.ToString(scoreX);
  19. toolStripMenuItem4.Text = scoreXtext;
  20. break;
  21. }
  22.  
  23. else if ( (list[i][j].Text == "o" && list[i + 1][j].Text == "o" && list[i + 2][j].Text == "o" && list[i + 3][j].Text == "o" && list[i + 4][j].Text == "o")
  24. || (list[i][j].Text == "o" && list[i][j + 1].Text == "o" && list[i][j + 2].Text == "o" && list[i][j + 3].Text == "o" && list[i][j + 4].Text == "o")
  25. || (list[i][j].Text == "o" && list[i + 1][j + 1].Text == "o" && list[i + 2][j + 2].Text == "o" && list[i + 3][j + 3].Text == "o" && list[i + 4][j + 4].Text == "o")
  26. || (list[i][j].Text == "o" && list[i + 1][j - 1].Text == "o" && list[i + 2][j - 2].Text == "o" && list[i + 3][j - 3].Text == "o" && list[i + 4][j - 4].Text == "o") )
  27. {
  28. timer1.Enabled = false;
  29. Win winner = new Win();
  30. winner.StartPosition = FormStartPosition.CenterScreen;
  31. winner.Show();
  32. winner.TxtBoxWin = "O WON!";
  33. scoreO++;
  34. scoreOtext = Convert.ToString(scoreO);
  35. toolStripMenuItem5.Text = scoreOtext;
  36. rex = true;
  37. break;
  38. }
  39. }
  40. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,1): error CS1525: Unexpected symbol `for'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty