Add files via upload

This commit is contained in:
Justin 2022-07-20 09:19:00 -04:00 committed by GitHub
commit 282db0889a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 267 additions and 68 deletions

View file

@ -0,0 +1,100 @@
function randomNumber(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
//Randomizer I copied from the internet
var output = '';
var win = 0;
var rounds = 0;
var winr = 0;
//Variables
function rockButton() {
output = '';
document.getElementById('rock').style.border = "3px solid #333333";
document.getElementById('paper').style.border = "3px solid #000000";
document.getElementById('scissors').style.border = "3px solid #000000";
output += 1;
}
function paperButton() {
output = '';
document.getElementById('paper').style.border = "3px solid #333333";
document.getElementById('rock').style.border = "3px solid #000000";
document.getElementById('scissors').style.border = "3px solid #000000";
output += 2;
}
function scissorsButton() {
output = '';
document.getElementById('scissors').style.border = "3px solid #333333";
document.getElementById('rock').style.border = "3px solid #000000";
document.getElementById('paper').style.border = "3px solid #000000";
output += 3;
}
//Buttons for the options
function button() {
var bot = (randomNumber(1, 3));
var final = output / bot;
switch (bot) {
case 1:
document.getElementById("bot").innerHTML = "Bot chose stone.";
break;
case 2:
document.getElementById("bot").innerHTML = "Bot chose origami.";
break;
case 3:
document.getElementById("bot").innerHTML = "Bot chose sword.";
break;
}
switch (final) {
case 1:
document.getElementById("answer").innerHTML = "Tie";
break;
case 0.5:
document.getElementById("answer").innerHTML = "You chose stone and lost...";
rounds += 1;
break;
case 0.3333333333333333:
document.getElementById("answer").innerHTML = "You chose stone and won!";
win += 1;
rounds += 1;
break;
case 2:
document.getElementById("answer").innerHTML = "You chose origami and won!";
win += 1;
rounds += 1;
break;
case 0.6666666666666666:
document.getElementById("answer").innerHTML = "You chose origami and lost...";
rounds += 1;
break;
case 3:
document.getElementById("answer").innerHTML = "You chose sword and lost...";
rounds += 1;
break;
case 1.5:
document.getElementById("answer").innerHTML = "You chose sword and won!";
win += 1;
rounds += 1;
break;
case 0:
document.getElementById("answer").innerHTML = "You didn't pick anything.";
}
//Yikes that's a lot of cases and repetition
if (rounds >= 1) {
winr = Math.round(win/rounds*100);
document.getElementById("winrate").innerHTML = "Winrate: " + winr + "%";
} else {
document.getElementById("winrate").innerHTML = "Winrate:";
}
//I made this in like 2 minutes there's probably a more efficient way to calculate without it breaking
}
//Probably too many functions in a button but that's only way I know how to update page on press

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View file

@ -0,0 +1,33 @@
<?php
/*
__ __ _____ _____
| \/ | __ \ | ____|
| \ / | | | |_ _| |__
| |\/| | | | \ \ / /___ \
| | | | |__| |\ V / ___) |
|_| |_|_____/ \_/ |____/ Join us. The hype is real.
You may code your application however you like.
It may be designed however you like.
You can do whatever you want, as long as you aren't mischievous.
You will not be able to access anything from Misdew's database.
However, you can connect to your own external database(s) if needed.
Be sure to fill out the required info below.
Once your app is done, zip all of your files into an archive.
Be sure to also include this file in the archive.
Name this archive as so: Username_AppName.zip
Upload this archive to dev.misdew.com
*/
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # FILL OUT THE FORM # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
$application_name = "Stone Origami Sword"; // Must not exceed 18 chars
$application_icon = "https://i.imgur.com/8oQmLWE.png"; // Upload your square, 1080x1080 icon to Imgur and paste the direct link here
$application_desc = "Play Stone Origami Sword against a bot."; // Describe your app
$application_price = "100"; // Set the price of your app (0 to whatever you want; you keep 70%)
$application_dev = "Lock"; // Enter your Misdew username here
$application_color = "black"; // Your app color; should be the same color as your icon's main color
$application_tcolor = "#333333"; // Should look good on top of your app's color (is used for font)
?>

View file

@ -0,0 +1,66 @@
@import url('https://fonts.googleapis.com/css?family=Dosis:400,700');
th {
width: 200px;
height: 200px;
padding: 10px;
border-radius: 100%;
}
img {
width: 200px;
height: 200px;
padding: 10px;
}
body {
background-color: #000000;
margin: 0px;
font-family: 'Dosis', sans-serif;
}
.title {
background-color: #000000 !important;
width: 100%;
margin-top: 15px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 10px;
height: 70px;
padding: 0px;
text-align: center;
color: #333333;
font-size: 45px;
line-height: 60px;
font-family: 'Dosis', sans-serif;
}
#rock, #paper, #scissors {
border: 3px solid #000000;
}
* {
font-family: 'Dosis', sans-serif;
}
#answer, #bot, #winStatic, #winrate {
color: #333333;
font-size: 30px;
}
#buttonDiv {
height: 66px;
width: 150px;
background-color: #000000;
border-radius: 5em;
border: 2px solid #333333;
line-height: 40px;
font-size: 25px;
color: #333333;
font-family: 'Dosis', sans-serif;
}
#patch {
color: white;
background-color: #2c2c2c;
text-decoration: underline;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB