C# Programming Recursion in Candy Crush Tutorial [Part 6] flood fill algorithm

preview_player
Показать описание
Part of a tutorial on building a candy-crush like game that demonstrates the flood fill recursive algorithm. In this video we will code the entire flood fill algorithm showing incremental steps of development.
Рекомендации по теме
Комментарии
Автор

you have an overflow error when you select a cell with the same color of currCell
so surround with an if statement, when you first call floodFill:
if
{
floodFill(button.row, button.col);
}

yasinalpay
Автор

hello, here i made a change and when i do floodfill, i remove the same colors and remain only the button which i click. after this i want to move buttons to nearest right and have a space on the top left. but i cant move the buttons. could you give an advise?

magcag
Автор

Thanks man, very helpful in trying to understand the algorithm.

mkz
welcome to shbcf.ru