Merge branch 'dev'
This commit is contained in:
commit
a6c60ac3c4
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user