Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int checkDiagonal1(int zeile, int spalte, char player) {
- int counter = 0;
- for (int z = 0; z < ZEILEN; z++) {
- for (int i = z, j = 0; i < ZEILEN && j < SPALTEN; i++, j++) {
- if (spielfeld[i][j] == player) {
- counter++;
- if (counter == 4) {
- return 1;
- }
- }
- else {
- counter = 0;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement