Created
May 4, 2026 08:05
-
-
Save kaineer/23e0b6dc20b24c1d1d02ff919586aa75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Все, что было раньше плюс | |
| const makeCell = (x, y) => { | |
| return "<div class='item' data-pos='" + x + ":" + y + "'></div>" | |
| } | |
| const makeRow = (y) => { | |
| let row = "<div class='row'>"; | |
| for (let x = 0; x <= 10; x++) { | |
| row += makeCell(x, y); | |
| } | |
| row += "</div>"; | |
| return row; | |
| } | |
| const makeBoard = () => { | |
| let board = ""; | |
| for (let y = 0; y <= 10; y++) { | |
| board += makeRow(y); | |
| } | |
| return board; | |
| } | |
| html(first("main"), makeBoard()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment