Skip to content

Commit

Permalink
Add game and change style.css
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerPalko committed Apr 30, 2024
1 parent 3d1d1fa commit 27ea014
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 2 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ <h1>Tyler's Game Hub</h1>
<br><br>
<a href="iceagebabyadventure">Ice Age Baby Adventure</a>
<br><br>
<a href="jumpingfrogspuzzle">Jumping frogs puzzle</a>
<br><br>
<a href="konnekt">Konnekt</a>
<br><br>
<a href="minecraft0.30">Minecraft 0.30</a>
Expand Down
5 changes: 5 additions & 0 deletions jumpingfrogspuzzle/frogpuzzle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

137 changes: 137 additions & 0 deletions jumpingfrogspuzzle/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!doctype html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNYG5VNX6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-KVNYG5VNX6');
</script>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
<title>Jumping Frogs Puzzle</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import url(https://fonts.googleapis.com/css?family=Josefin+Sans:700|Open+Sans:700,600,300,300italic);
html {
background-color: #202124;
color: #ffffff;
}
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
strong {
font-weight:600;
}
h1, h2, h3 {
font-family: 'Josefin Sans', sans-serif;
font-weight: 400;
}
#container {
max-width:1000px;
margin: 0 auto;
}
p, ul {
font-size: 18px;
}
a:link {
color: #8ab4f8;
background-color: transparent;
text-decoration: none;
}
a:visited {
color: #c58af9;
background-color: transparent;
text-decoration: none;
}
a:hover {
color: #c58af9;
background-color: transparent;
text-decoration: underline;
}
</style>
</head>
<body>
<div id='container'>
<div id='puzzle'>
<h1>Jumping frogs puzzle</h1>
<svg id='svgpuzzle' viewBox='0 0 1000 200'>
<defs>
<g id='counterA'>
<circle cx='50' cy='50'
r='45' fill='blue' />
</g>
<g id='counterB'>
<circle cx='50' cy='50'
r='45' fill='red' />
</g>
<g id='frogA' fill='blue'>
<ellipse cx='45' cy='50' rx='30' ry='45' />
<circle cx='70' cy='25' r='15' />
<circle cx='70' cy='25' r='12' fill='white' />
<circle cx='70' cy='25' r='8' fill='black' />
<circle cx='70' cy='75' r='15' />
<circle cx='70' cy='75' r='12' fill='white' />
<circle cx='70' cy='75' r='8' fill='black' />
</g>
<g id='frogB' fill='green'>
<ellipse cx='55' cy='50' rx='30' ry='45' />
<circle cx='30' cy='25' r='15' />
<circle cx='30' cy='25' r='12' fill='white' />
<circle cx='30' cy='25' r='8' fill='black' />
<circle cx='30' cy='75' r='15' />
<circle cx='30' cy='75' r='12' fill='white' />
<circle cx='30' cy='75' r='8' fill='black' />
</g>
<g id='hiconB'>
<circle cx='50' cy='50'
r='45' fill='yellow' stroke='black' />
</g>
<g id='hiconA'>
<circle cx='50' cy='50'
r='45' fill='black' />
</g>
</defs>
<g id='grid' stroke='black' fill='white' stroke-width='3'></g>
<g id='counters'></g>
</svg>
<h2 id='message'>&nbsp;</h2>
<p>Moves: <span id='count'></span></p>
<button id='reset'>Reset</button>
<p>
<button id='down'>-</button>
<span id='numcounters' style='display:inline-block; width:3em; text-align:center;'>3</span>
<button id='up'>+</button>
</p>
<p>
Counters:
<select id='counterdropdown'>
<option value='#counter'>circles</option>
<option value='#frog'>frogs</option>
<option value='#hicon'>high contrast</option>
</select>
</p>
<h2>Rules:</h2>
<ul>
<li>The left set of counters can only move right, the right set of counters
can only move left.</li>
<li>Counters can move forward one space, or move two spaces by jumping over
another counter.</li>
<li>The puzzle is solved when the two sets of counters have switched positions.</li>
</ul>
</div>
<div>

<p><a href="https://primefactorisation.com/blog/2016/04/14/interactive-jumping-puzzle/">Further information about this puzzle</a></p>
<p>
Created by Shaun Carter &copy; 2016.<br/>
<a href='https://primefactorisation.com/'> The Prime Factorisation of Me</a>
</p>
</div>
</div>
<script src='frogpuzzle.js'></script>
</body>
</html>
3 changes: 1 addition & 2 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import url('https://rsms.me/inter/inter.css');
html {
background-color: #202124;
color: #ffffff;
Expand Down Expand Up @@ -30,4 +29,4 @@ html {
color: #c58af9;
background-color: transparent;
text-decoration: underline;
}
}

0 comments on commit 27ea014

Please sign in to comment.