Last active
May 14, 2019 02:16
-
-
Save mustmodify/f9fd384669d588d60006b5f46cf32eae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function maxInARow(grid) | |
{ | |
int max_in_a_row = 0; | |
for(int checkRow = 0; checkRow < maxRows; checkRow++;) | |
{ | |
for(int checkCol = 0; checkCol < maxCols; checkCol++;) | |
{ | |
max_in_a_row = Math.max( max_in_a_row, downright_in_a_row(grid, checkCol, checkRow), downleft_in_a_row(grid, checkCol, checkRow), | |
max_horizontal(grid, checkCol, checkRow), max_vert(grid, checkCol, checkRow)) | |
} | |
} | |
return max_in_a_row | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment