Skip to content

Commit

Permalink
added Mew generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanzinator committed Aug 1, 2024
1 parent 6754a3a commit ecf3cbd
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 1 deletion.
22 changes: 22 additions & 0 deletions MewCSS.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
body {
background-color: black;
}
.container{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.mewAct {
margin: 30px;
width: 100px;
height: 60px;
font-size: larger;
background-color: black;
color: aliceblue;
}
#ArtificialMew {
height: 60px;
font-size: larger;
color: aliceblue;
}
70 changes: 70 additions & 0 deletions MewScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
function odds(odds) {
return (odds >= Math.floor(Math.random() * 11));
}

function Mew() {
var mew = "";
if (odds(7)){
if (odds(8)) {
mew += "M"
} else {
mew += "m"
}

while(odds(2)) {
mew += "m"
}

mew += "e"

while(odds(6)){
mew += "e"
}

mew += "w"

while(odds(9)){
mew += "w"
}

while(odds(4)){
mew += "!"
}

while(odds(2)) {
mew += "~"
}

}
else {

mew += "M"

while(odds(2)) {
mew += "M"
}

mew += "E"

while(odds(6)){
mew += "E"
}

mew += "W"

while(odds(9)){
mew += "W"
}

while(odds(7)){
mew += "!"
}

while(odds(2)) {
mew += "~"
}

}
document.getElementById("ArtificialMew").innerHTML = mew;
return mew;
}
10 changes: 9 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,17 @@ <h1 class="cardText">lmao look at me <br> I'm a card</h1>
<div class="Part third">
<div class="letterTracker" onclick="sendLetter()">letter tracker!</div>
</div>
<div class="Part fourth"></div>
<div class="Part fourth">
<div class="container">
<button class="MewAct" onclick="Mew()">Mew!</button>
<p id="ArtificialMew"></p>
</div>
</div>
</div>

<link rel="stylesheet" href="HomeStyle.css">
<link rel="stylesheet" href="MewCSS.css">


<script src="HomeStyleCode.js"></script>
<script src="MewScript.js"></script>

0 comments on commit ecf3cbd

Please sign in to comment.