Skip to content

Commit

Permalink
More easter eggs and a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dhmmasson committed Oct 2, 2022
1 parent b78f1a3 commit d091bd6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ <h4>Game Over</h4>
<p id="highScore">You should not read that! You don't have finished the game yet.</p>
</div>
<div class="modal-footer">
<a id="gameOverRestart" href="#!" class="modal-close waves-effect waves-green btn-flat startGame">Agree</a>
<a id="gameOverRestart" href="#!" class="modal-close waves-effect waves-green btn-flat startGame">Start
Over</a>
</div>
</div>

Expand Down Expand Up @@ -104,7 +105,8 @@ <h5> Every Ten Seconds a tile disappears from the board</h5>

</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn-flat startGame">Start the game</a>
<a href="#!" id="gameOverButton" class="modal-close waves-effect waves-green btn-flat startGame">Start the
game</a>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function setup() {
var elems = document.querySelectorAll('.modal');
var instances = M.Modal.init(elems, { dismissible: true });
console.clear()

gui.add({ splashScreen: () => { instances[1].open() } }, 'splashScreen').name("Splash Screen")
if (localStorage.getItem('readSplash') != 'true') {
instances[1].open()
localStorage.setItem('readSplash', true)
Expand Down
18 changes: 18 additions & 0 deletions js/ontologie.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function createOntology() {
const odd = new Node('odd', 5); Number.addChild(odd)
const even = new Node('even', 5); Number.addChild(even)
const prime = new Node('prime', 10); Number.addChild(prime)
const powerOfTwo = new Node('powerOfTwo', 5); Number.addChild(powerOfTwo)
const powerOfThree = new Node('powerOfThree', 5); Number.addChild(powerOfThree)
const theAnswerToEverything = new Node('theAnswerToEverything', 42); Number.addChild(theAnswerToEverything)
const niceNumber = new Node('Nice!', 69); Number.addChild(niceNumber)

const Color = new Node('Color', 0); root.addChild(Color)
const Red = new Node('Red', 5); Color.addChild(Red)
Expand Down Expand Up @@ -90,6 +94,9 @@ function createOntology() {


const primeUnder100 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
const listofpowerOfTwo = [1, 2, 4, 8, 16, 32, 64]
const listofpowerOfThree = [1, 3, 9, 27, 81, 243, 729]

for (let number = 0; number < 99; number++) {
const node = new Node(number, 50)
//Number.addChild(node)
Expand All @@ -101,14 +108,25 @@ function createOntology() {
if (primeUnder100.includes(number)) {
prime.addChild(node)
}
if (listofpowerOfTwo.includes(number)) {
powerOfTwo.addChild(node)
}
if (listofpowerOfThree.includes(number)) {
powerOfThree.addChild(node)
}
//Add number to candidates
candidateSymbols.push(node)
}
//Copilot knows... this was written by copilot...
//niceNumber.addChild(new Node("69", 0))
//theAnswerToEverything.addChild(new Node("42", 0))

//Easter Eggs
Number.addChild(root.findNode("e"))
Number.addChild(root.findNode("i"))
Number.addChild(root.findNode("O"))
niceNumber.addChild(root.findNode(69))
theAnswerToEverything.addChild(root.findNode(42))
root.findNode(0).addChild(root.findNode("O"))


Expand Down

0 comments on commit d091bd6

Please sign in to comment.