In the previous lesson, you had to make a function to activate cells. With its help, we can already start the game process:
let field = document.querySelector('#field');
let size = 2; // an initial field size
activate(build(field, prepare(size)));
However, it would be better to move the start of the game into a separate function:
let field = document.querySelector('#field');
start(2);
function start(size) {
activate(build(field, prepare(size)), size);
}
Implement the described beginning of the game.
Try to create fields of different sizes by
passing different parameters to the
start function.