$game = new game;
// Создание карты.
// Первый параметр - размер карты.
// Второй параметр - процент заполненность живыми клетками.
$game->generate(30, 25);
// Создание карты со своей вставкой.
// Первый параметр - размер карты.
// Второй параметр - матрица со вставкой.
// Третий параметр - массив смещения.
$game->build_map(30, [['▓▓','░░','░░'], ['░░','▓▓','▓▓'], ['▓▓','▓▓','░░']], [3, 3]);
// Запуск бесконечного цикла
while(true){
$game->update_map(); // Обновить карту.
echo $game->compile(1)."\n"; // Вывод. Можно указать отступы.
}
-
Notifications
You must be signed in to change notification settings - Fork 0
kirull1/Conway-s-Game-of-Life
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published