@@ -0,0 +1,160 @@
// x, y, width, height
levels = [
{
// 1-V
lines :
[
[50, 0, 0, 100]
],
answer :
[[-1,0,100],[0,1,0],[0,0,1]]
, player :
[4, 46],
par: 1
},
{
// 3-V
lines :
[
[40, 0, 0, 100],
[50, 0, 0, 100],
[60, 0, 0, 100]
],
answer :
[[1,0,60],[0,1,0],[0,0,1]]
, player :
[4, 46],
par: 4
},
{
// 1-V-2-H
lines :
[
[0, 60, 100, 0],
[40, 0, 0, 100],
[50, 0, 0, 100]
],
answer :
[[1,0,40],[0,-1,120],[0,0,1]]
, player :
[4, 46],
par: 5
},
{
// 2-V-0-H-1-D
lines :
[
[30, 0, 20, 100],
[60, 0, 0, 100],
[80, 0, 0, 100]
],
answer :
[[1,0,36.92307692307692],[0,1.0000000000000002,-15.384615384615385],[0,0,1]]
, player :
[4, 46],
par: 4
},
{
// 1-V-1-H-1-D
lines :
[
[20, 0, 30, 100],
[30, 0, 0, 100],
[0, 70, 100, 0]
],
answer :
[[-0.8348623853211009,0.5504587155963303,-3.6697247706422047],[-0.5504587155963302,-0.834862385321101,138.89908256880736],[0,0,1]]
, player :
[4, 46],
par: 4
},
{
// 1-V-0-H-2-D
lines :
[
[10, 0, 10, 100],
[50, 0, 0, 100],
[0, 20, 100, 40]
],
answer :
[[0.14999823406835316,0.9886862645836523,6.597520631968052],[0.988686264583652,-0.14999823406835328,68.11551547544767],[0,0,1]]
, player :
[4, 46],
par: 5
},
{
// 2-V-1-H-1-D
lines :
[
[30, 0, 0, 100],
[50, 0, 0, 100],
[0, 70, 100, -30],
[0, 70, 100, 0]
],
answer :
[[0.834862385321101,0.5504587155963303,34.862385321100916],[-0.5504587155963302,0.8348623853211009,-10.45871559633028],[0,0,1]]
, player :
[4, 46],
par: 6
},
{
// Cross with two diagonals
lines :
[
[0, 20, 100, 40],
[0, 60, 100, -10],
[40, 0, 0, 100],
[0, 80, 100, 0]
],
answer :
[[-0.7241379310344828,0.689655172413793,42.11676340047798],[0.6896551724137929,0.7241379310344827,-5.995220211676354],[0,0,1]]
, player :
[4, 46],
par: 7
},
{
// 2-V-0-H-2-D
lines :
[
[20, 0, 0, 100],
[50, 0, 0, 100],
[10, 0, 90, 70],
[0, 70, 100, -50]
],
answer :
[[-0.24615384615384622,-0.9692307692307695,76.15384615384615],[0.9692307692307695,-0.24615384615384622,76.76923076923077],[0,0,1]]
, player :
[4, 46],
par: 6
},
{
// 1-V-1-H-2-D
lines :
[
[0, 30, 100, 0],
[40, 0, 0, 100],
[0, 80, 80, -100],
[20, 0, 100, 60]
],
answer :
[[-0.9641319942611192,0.265423242467719,48.26398852223818],[-0.26542324246771887,-0.9641319942611191,90.8464849354376],[0,0,1]]
, player :
[4, 46],
par: 6
},
{
// Cross with two diagonals, containing a V shape
// TODO: Delete?
lines :
[
[0, 10, 50, 90],
[50, 0, 0, 100],
[0, 60, 100, 0],
[0, 40, 100, -10]
],
answer :
[[0.6106926463383254,-0.7918677236182143,102.80083691920044],[0.7918677236182146,0.6106926463383255,46.69157747803904],[0,0,1]]
, player :
[4, 46]
}
];
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,6 +7,7 @@

<script src="/static/flip/numeric.min.js"></script>
<script src="/static/flip/svg.min.js"></script>
<script src="/static/flip/levels.js"></script>
<script src="/static/flip/game.js"></script>

<title>Flip</title>
@@ -75,15 +76,20 @@

<nav><h1><a href="/games">Cosine Gaming</a></h1></nav>
<h2 class="entry-spaced">Flip</h2>
<p class="entry-spaced">Flip is a puzzle game about reflecting.</p>
<p class="entry-spaced">
Flip is a puzzle game about reflecting.
</p>
<p class="entry-spaced">
Try to get the white sheep to the black one.
Click on a line to reflect across it.
Click on a line to reflect across it. Press R to restart.
</p>
<p class="entry-spaced">
You get 20 points if you solve a level without going over the par.
10 for solving one. You lose 5 points for going out of the level.
</p>
<p class="entry-spaced">
Your game is saved automatically.
</p>

</div>