Skip to content

Instantly share code, notes, and snippets.

View nullableVoidPtr's full-sized avatar
👋
henlo break pls

Avery nullableVoidPtr

👋
henlo break pls
View GitHub Profile
const BOMB = -1;
const BLANK = 0;
function generateMap(width, height, bombCount)
{
const map = Array.from(new Array(height), () => Array.from(new Array(width), () => 0));
for(let i = 0; i < bombCount; ) {
const posX = Math.floor(Math.random() * width);
const posY = Math.floor(Math.random() * height);