Quote:
Originally Posted by OneDay
Where is start and end?
Better:
PHP код:
enum e_maze_algorithm {
maze_algorithm_prim,
maze_algorithm_backtrack
}
CreateInGameMaze(Float:origin_x, Float:origin_y, Float:origin_z, m_height, m_width, walls_color = 0x000000FF, spaces_color = 0xFFFFFFFF, start_color = 0xFF0000FF, e_maze_algorithm:algorithm = maze_algorithm_backtrack, bool: no_dead_end = false);
Can add more and just only use one.
|
Not really, because you can use multiple algorithms at the same time.
Код:
CreateMazeBitmap("maze_test.bmp", 45, 45, 0x000000FF, 0xFFFFFFFF, 0xFF0000FF, true, false, true);
In this particular case, I'm using backtrack and no_dead_end at the same time.
Now using an enum to place all the available algorithms is not a bad idea.
The red colored object or cell is supposed to be the start, the end could be anywhere really.