Why are those functions in Program.Main?
Closed this issue · 0 comments
incredibleLeitman commented
SoltMachine/SoltMachine/Program.cs
Lines 148 to 198 in aa6f8cd
bool CheckColumnMatch(int[,] numbers, int selectedCol) | |
{ | |
for (int row = 1; row < NUMBER_OF_ROWS; row++) | |
{ | |
if (numbers[row, selectedCol - 1] != numbers[0, selectedCol - 1]) | |
{ | |
UIMethods.NoMatchfound(selectedCol); | |
return false; | |
} | |
} | |
UIMethods.Matchfound(COLUMN,WINNINGS); | |
return true; | |
} | |
bool CheckDiagonalMatch1(int[,]numbers) | |
{ | |
for (int diagonal = 1; diagonal < NUMBER_OF_ROWS; diagonal++) | |
{ | |
if (numbers[diagonal, diagonal] != numbers[0, 0]) | |
{ | |
return false; | |
} | |
} | |
UIMethods.Matchfound(DIAGONAL,WINNINGS); | |
return true; | |
} | |
bool CheckDiagonalMatch2(int[,]numbers) | |
{ | |
for (int diagonal = 0; diagonal < NUMBER_OF_ROWS; diagonal++) | |
{ | |
if (numbers[diagonal, NUMBER_OF_COLUMNS - 1 - diagonal] != numbers[0, NUMBER_OF_COLUMNS - 1]) | |
{ | |
return false; | |
} | |
} | |
UIMethods.Matchfound(DIAGONAL2,WINNINGS); | |
return true; | |
} |
You have the same function already in your logic file :D