From 69ce8cd8a6e1848bb35f6eea7026b72a4157f76c Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Wed, 4 Sep 2024 14:56:03 +0200 Subject: [PATCH] loops uke 5 --- MVC/minesweeper/index.html | 4 ++-- oppgaver/uke5/2randomEqual.html | 32 ++++++++++++++++++++++++++++++ oppgaver/uke5/loops-2gangen.html | 27 +++++++++++++++++++++++++ oppgaver/uke5/revers.html | 33 +++++++++++++++++++++++++++++++ oppgaver/uke5/vokaler.html | 34 ++++++++++++++++++++++++++++++++ 5 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 oppgaver/uke5/2randomEqual.html create mode 100644 oppgaver/uke5/loops-2gangen.html create mode 100644 oppgaver/uke5/revers.html create mode 100644 oppgaver/uke5/vokaler.html diff --git a/MVC/minesweeper/index.html b/MVC/minesweeper/index.html index 70b59b9..146144e 100644 --- a/MVC/minesweeper/index.html +++ b/MVC/minesweeper/index.html @@ -131,12 +131,12 @@ modelCell.isOpen = true; showMatrix(); } - function countBomb(row, column){ + function countBomb(row, column) { if (row < 0 || row >= size || column < 0 || column >= size) return 0; return matrixModel.rows[row].cells[column].isBomb } - function openBlankCells(rowIndex, columnIndex){ + function openBlankCells(rowIndex, columnIndex) { if (rowIndex < 0 || rowIndex >= size || columnIndex < 0 || columnIndex >= size) return; var modelCell = matrixModel.rows[rowIndex].cells[columnIndex]; if (!modelCell.isBomb && !modelCell.isOpen && modelCell.bombsNearBy === 0) { diff --git a/oppgaver/uke5/2randomEqual.html b/oppgaver/uke5/2randomEqual.html new file mode 100644 index 0000000..320c202 --- /dev/null +++ b/oppgaver/uke5/2randomEqual.html @@ -0,0 +1,32 @@ + + + + + + + Document + + + +
Numbers tested:
+
+ +
+ + + + + \ No newline at end of file diff --git a/oppgaver/uke5/loops-2gangen.html b/oppgaver/uke5/loops-2gangen.html new file mode 100644 index 0000000..d0ef1b7 --- /dev/null +++ b/oppgaver/uke5/loops-2gangen.html @@ -0,0 +1,27 @@ + + + + + + + Document + + + +
+ +
+ + + + \ No newline at end of file diff --git a/oppgaver/uke5/revers.html b/oppgaver/uke5/revers.html new file mode 100644 index 0000000..9b71719 --- /dev/null +++ b/oppgaver/uke5/revers.html @@ -0,0 +1,33 @@ + + + + + + + Document + + + +
+ +
Fra Bruker
+
Reversert
+
+ + + + \ No newline at end of file diff --git a/oppgaver/uke5/vokaler.html b/oppgaver/uke5/vokaler.html new file mode 100644 index 0000000..d3e8e88 --- /dev/null +++ b/oppgaver/uke5/vokaler.html @@ -0,0 +1,34 @@ + + + + + + + Finn vokaler + + + + +
inputString
+
vokaler
+ + + + + + + \ No newline at end of file