Merge branch 'dev'

This commit is contained in:
Trimutex 2024-02-01 11:25:43 -06:00
commit a6c60ac3c4

View File

@ -57,12 +57,8 @@ namespace snakeplusplus
*/ */
// Probability-based approach for fun // Probability-based approach for fun
double roll = ((double) GenerateRandomNumber(RAND_MAX)) / ((double) RAND_MAX); double roll = ((double) GenerateRandomNumber(RAND_MAX)) / ((double) RAND_MAX);
if (roll <= probabilityBFS) if (roll <= probabilityBFS) { BFS(gameBoard, source, boundaries); }
{ else { DFS(gameBoard, source, boundaries); }
BFS(gameBoard, source, boundaries);
} else {
DFS(gameBoard, source, boundaries);
}
// Create path for food // Create path for food
path.push(botPathUnsanitized.top()); path.push(botPathUnsanitized.top());
botPathUnsanitized.pop(); botPathUnsanitized.pop();