Template
1
0

Completed

This commit is contained in:
glls2
2025-11-14 16:51:15 +03:00
parent 1bec3cdb97
commit c3729b2fe8

View File

@@ -120,7 +120,10 @@
/* TODO: Add a 3px solid gray border */
/* YOUR CODE HERE */
width: 400px;
height: 400px;
display: grid;
border: 3px solid gray;
grid-template-columns: repeat(var(--grid-size), 1fr);
grid-template-rows: repeat(var(--grid-size), 1fr);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
@@ -375,7 +378,7 @@
announceBtn.addEventListener('click', announceGameState);
// Initialize the chess board
function initializeGame() {
function createChessBoard() {
createBoard();
setupPieces();
updateGameStatus();
@@ -393,7 +396,8 @@
/* === STUDENT TASK 3: CREATE NESTED FOR LOOPS === */
// TODO: Create nested for loops to make an 8x8 grid
// Outer loop for rows (0 to 7)
/* YOUR CODE HERE */ {
for (let row = 0; row < 8; row++) {
for (let col = 0; col < 8; col++) {
// Inner loop for columns (0 to 7)
/* YOUR CODE HERE */ {