mirror of
https://github.com/wassname/cardsforscience.git
synced 2026-06-27 16:14:52 +08:00
fix initial cards, and seo fixes
This commit is contained in:
+2
-2
@@ -57,7 +57,7 @@ gulp.task('s3', function () {
|
||||
// ...
|
||||
};
|
||||
|
||||
return gulp.src('./dist/**',{cwd:'.'})
|
||||
return gulp.src('./dist/**/*.*',{cwd:'.'})
|
||||
|
||||
// rename to put in subfolder
|
||||
// .pipe(rename(function (path) {
|
||||
@@ -70,7 +70,7 @@ gulp.task('s3', function () {
|
||||
// publisher will add Content-Length, Content-Type and headers specified above
|
||||
// If not specified it will set x-amz-acl to public-read by default
|
||||
// Noe: this has been made concurrent using concurrent-transform
|
||||
.pipe(concurrent(publisher.publish(headers,{'force':true})), 10)
|
||||
.pipe(concurrent(publisher.publish(headers)), 10)
|
||||
|
||||
// create a cache file to speed up consecutive uploads
|
||||
.pipe(publisher.cache())
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 8.5 KiB |
+109
-119
@@ -1,119 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="200"
|
||||
height="250"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="favicon.svg"
|
||||
inkscape:export-filename="/media/isisilon/Data/My_Documents/Documents/eclipse-workspace/science-clicker/cardsforscience/src/assets/favicon.png"
|
||||
inkscape:export-xdpi="261.56"
|
||||
inkscape:export-ydpi="261.56">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1029"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.7245258"
|
||||
inkscape:cx="33.201474"
|
||||
inkscape:cy="112.04866"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 199,10 c 0,-5 -4,-9 -9,-9 L 10,1 C 5,1 1,5 1,10 l 0,230 c 0,5 4,9 9,9 l 180,0 c 5,0 9,-4 9,-9 l 0,-230 z"
|
||||
id="path3229"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<g
|
||||
transform="matrix(-2.9449287,0,0,2.9449287,255.30863,-21.770781)"
|
||||
id="XMLID_13_"
|
||||
style="fill:#d40000">
|
||||
<g
|
||||
id="g4"
|
||||
style="fill:#d40000">
|
||||
<g
|
||||
id="XMLID_10_"
|
||||
style="fill:#d40000">
|
||||
<g
|
||||
id="g7"
|
||||
style="fill:#d40000">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path9"
|
||||
d="M 69.902,72.704 58.967,61.769 c -2.997,1.961 -6.579,3.111 -10.444,3.111 -10.539,0 -19.062,-8.542 -19.062,-19.081 0,-10.519 8.522,-19.061 19.062,-19.061 10.521,0 19.06,8.542 19.06,19.061 0,3.679 -1.036,7.107 -2.828,10.011 l 11.013,11.011 c 0.583,0.567 0.094,1.981 -1.076,3.148 l -1.64,1.644 c -1.17,1.167 -2.584,1.656 -3.15,1.091 z M 61.249,45.799 c 0,-7.033 -5.695,-12.727 -12.727,-12.727 -7.033,0 -12.745,5.694 -12.745,12.727 0,7.033 5.712,12.745 12.745,12.745 7.032,0 12.727,-5.711 12.727,-12.745 z"
|
||||
style="fill:#d40000" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.62434274,0,0,0.62434274,-6.245355,-1.93177)"
|
||||
id="XMLID_13_-9">
|
||||
<g
|
||||
id="g4-7">
|
||||
<g
|
||||
id="XMLID_10_-3">
|
||||
<g
|
||||
id="g7-1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path9-3"
|
||||
d="M 69.902,72.704 58.967,61.769 c -2.997,1.961 -6.579,3.111 -10.444,3.111 -10.539,0 -19.062,-8.542 -19.062,-19.081 0,-10.519 8.522,-19.061 19.062,-19.061 10.521,0 19.06,8.542 19.06,19.061 0,3.679 -1.036,7.107 -2.828,10.011 l 11.013,11.011 c 0.583,0.567 0.094,1.981 -1.076,3.148 l -1.64,1.644 c -1.17,1.167 -2.584,1.656 -3.15,1.091 z M 61.249,45.799 c 0,-7.033 -5.695,-12.727 -12.727,-12.727 -7.033,0 -12.745,5.694 -12.745,12.727 0,7.033 5.712,12.745 12.745,12.745 7.032,0 12.727,-5.711 12.727,-12.745 z" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-0.62434274,0,0,-0.62434274,206.24536,251.93177)"
|
||||
id="XMLID_13_-9-1">
|
||||
<g
|
||||
id="g4-7-5">
|
||||
<g
|
||||
id="XMLID_10_-3-7">
|
||||
<g
|
||||
id="g7-1-1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path9-3-6"
|
||||
d="M 69.902,72.704 58.967,61.769 c -2.997,1.961 -6.579,3.111 -10.444,3.111 -10.539,0 -19.062,-8.542 -19.062,-19.081 0,-10.519 8.522,-19.061 19.062,-19.061 10.521,0 19.06,8.542 19.06,19.061 0,3.679 -1.036,7.107 -2.828,10.011 l 11.013,11.011 c 0.583,0.567 0.094,1.981 -1.076,3.148 l -1.64,1.644 c -1.17,1.167 -2.584,1.656 -3.15,1.091 z M 61.249,45.799 c 0,-7.033 -5.695,-12.727 -12.727,-12.727 -7.033,0 -12.745,5.694 -12.745,12.727 0,7.033 5.712,12.745 12.745,12.745 7.032,0 12.727,-5.711 12.727,-12.745 z" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="250"
|
||||
height="250"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="favicon.svg"
|
||||
inkscape:export-filename="/media/isisilon/Data/My_Documents/Documents/eclipse-workspace/science-clicker/cardsforscience/src/assets/favicon_color.png"
|
||||
inkscape:export-xdpi="46.080002"
|
||||
inkscape:export-ydpi="46.080002">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1029"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.9265307"
|
||||
inkscape:cx="112.20087"
|
||||
inkscape:cy="87.834521"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 224,10 c 0,-5 -4,-9 -9,-9 L 35,1 c -5,0 -9,4 -9,9 l 0,230 c 0,5 4,9 9,9 l 180,0 c 5,0 9,-4 9,-9 l 0,-230 z"
|
||||
id="path3229"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<g
|
||||
style="fill:#d40000"
|
||||
id="g4"
|
||||
transform="matrix(-2.9449287,0,0,2.9449287,280.30863,-21.770781)">
|
||||
<g
|
||||
style="fill:#d40000"
|
||||
id="XMLID_10_">
|
||||
<g
|
||||
style="fill:#d40000"
|
||||
id="g7">
|
||||
<path
|
||||
style="fill:#d40000"
|
||||
d="M 69.902,72.704 58.967,61.769 c -2.997,1.961 -6.579,3.111 -10.444,3.111 -10.539,0 -19.062,-8.542 -19.062,-19.081 0,-10.519 8.522,-19.061 19.062,-19.061 10.521,0 19.06,8.542 19.06,19.061 0,3.679 -1.036,7.107 -2.828,10.011 l 11.013,11.011 c 0.583,0.567 0.094,1.981 -1.076,3.148 l -1.64,1.644 c -1.17,1.167 -2.584,1.656 -3.15,1.091 z M 61.249,45.799 c 0,-7.033 -5.695,-12.727 -12.727,-12.727 -7.033,0 -12.745,5.694 -12.745,12.727 0,7.033 5.712,12.745 12.745,12.745 7.032,0 12.727,-5.711 12.727,-12.745 z"
|
||||
id="path9"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g4-7"
|
||||
transform="matrix(0.62434274,0,0,0.62434274,18.754645,-1.93177)">
|
||||
<g
|
||||
id="XMLID_10_-3">
|
||||
<g
|
||||
id="g7-1">
|
||||
<path
|
||||
d="M 69.902,72.704 58.967,61.769 c -2.997,1.961 -6.579,3.111 -10.444,3.111 -10.539,0 -19.062,-8.542 -19.062,-19.081 0,-10.519 8.522,-19.061 19.062,-19.061 10.521,0 19.06,8.542 19.06,19.061 0,3.679 -1.036,7.107 -2.828,10.011 l 11.013,11.011 c 0.583,0.567 0.094,1.981 -1.076,3.148 l -1.64,1.644 c -1.17,1.167 -2.584,1.656 -3.15,1.091 z M 61.249,45.799 c 0,-7.033 -5.695,-12.727 -12.727,-12.727 -7.033,0 -12.745,5.694 -12.745,12.727 0,7.033 5.712,12.745 12.745,12.745 7.032,0 12.727,-5.711 12.727,-12.745 z"
|
||||
id="path9-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g4-7-5"
|
||||
transform="matrix(-0.62434274,0,0,-0.62434274,231.24536,251.93177)">
|
||||
<g
|
||||
id="XMLID_10_-3-7">
|
||||
<g
|
||||
id="g7-1-1">
|
||||
<path
|
||||
d="M 69.902,72.704 58.967,61.769 c -2.997,1.961 -6.579,3.111 -10.444,3.111 -10.539,0 -19.062,-8.542 -19.062,-19.081 0,-10.519 8.522,-19.061 19.062,-19.061 10.521,0 19.06,8.542 19.06,19.061 0,3.679 -1.036,7.107 -2.828,10.011 l 11.013,11.011 c 0.583,0.567 0.094,1.981 -1.076,3.148 l -1.64,1.644 c -1.17,1.167 -2.584,1.656 -3.15,1.091 z M 61.249,45.799 c 0,-7.033 -5.695,-12.727 -12.727,-12.727 -7.033,0 -12.745,5.694 -12.745,12.727 0,7.033 5.712,12.745 12.745,12.745 7.032,0 12.727,-5.711 12.727,-12.745 z"
|
||||
id="path9-3-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 8.4 KiB |
@@ -268,6 +268,10 @@ h1 br {
|
||||
}
|
||||
}
|
||||
|
||||
.pc-icon {
|
||||
background-size: 32px 32px;
|
||||
}
|
||||
|
||||
/* Retina support */
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
||||
only screen and (min-resolution: 1.5dppx),
|
||||
@@ -280,6 +284,7 @@ h1 br {
|
||||
|
||||
.pc-icon:hover {
|
||||
background-image: url('../assets/favicon_color.png');
|
||||
background-size: 32px 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,3 +587,9 @@ margin left -15px on rows. So we fix it this way **/
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
||||
ol.intro {
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
+112
-84
@@ -8,24 +8,24 @@
|
||||
<meta property="og:title" content="Cards For Science">
|
||||
<meta property="og:type" content="game">
|
||||
<meta property="og:description" content="A card game where you work out the secret rule to determine which cards can be played next.">
|
||||
<meta property="og:image" content="assets/favicon.png">
|
||||
<meta property="og:image" content="src/assets/favicon.png">
|
||||
<meta name="msvalidate.01" content="36C4A686262A56C0F7978C7A90F26B1A" />
|
||||
<meta name="google-site-verification" content="SF3w4G37_C-mMW_XxVVRNhe1BdkyTjQwQfo9D_G0VbE" />
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="assets/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="assets/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="assets/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="assets/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="assets/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="assets/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="assets/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="assets/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="assets/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="assets/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16x16.png">
|
||||
<meta name="msapplication-TileImage" content="ssets//ms-icon-144x144.png">
|
||||
<!-- <link rel="apple-touch-icon" sizes="57x57" href="src/assets/favicons/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="src/assets/favicons/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="src/assets/favicons/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="src/assets/favicons/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="src/assets/favicons/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="src/assets/favicons/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="src/assets/favicons/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="src/assets/favicons/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="src/assets/favicons/apple-icon-180x180.png"> -->
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="src/assets/favicons/android-icon-192x192.png">
|
||||
<!-- <link rel="icon" type="image/png" sizes="32x32" href="src/assets/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="src/assets/favicons/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="src/assets/favicons/favicon-16x16.png"> -->
|
||||
<!-- <meta name="msapplication-TileImage" content="asrc/assets/favicons/ms-icon-144x144.png"> -->
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
@@ -34,6 +34,84 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="modal fade" id="cardModal" tabindex="-1" role="dialog" aria-labelledby="cardModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="cardModelLabel">🂠 Help</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Cards For Science is a solitaire card game where you must work out the secret rule. The rule decides which card can be played next, so play cards to test each rule, then guess correct one to win.
|
||||
|
||||
<p>
|
||||
Why are these cards "for science"? To win the game you have rules and try to break them. To do science you form competing hypothesis (or rules) and try to disprove (or break) them. The difference is that players try to discover the rules of the game but scientists try to discover the laws of the universe. Since the universe is complicated science is hard, but don't worry, we can use playing cards for scientific thought.
|
||||
</p>
|
||||
<p>
|
||||
For example, you have these cards: 🂢, 🂣, and 🂴. You have two rules but only one is true.
|
||||
<ol>
|
||||
<li>"The next card must be higher"</li>
|
||||
<li>"the next card must have a different suite"</li>
|
||||
</ol>
|
||||
Are these rules both valid? No because one rule has already been broken. The second rule says we can't have two clubs in a row and we have a two of clubs followed by a three of clubs. That leaves us with rule one, which we guess is the right rule. Correct!
|
||||
</p>
|
||||
<p class="small bg-warning">This is a pre-release.</p>
|
||||
|
||||
<h5><strong>Credits</strong></h5>
|
||||
This game is inspired by <a href="http://www.logicmazes.com/games/eleusis/">Eleusis</a> by Robert Abbott and John Golden's <a href="http://www.logicmazes.com/games/eleusis/express.html">Eleusis</a> Express.
|
||||
<h5><strong>Rules</strong></h5>
|
||||
<ul>
|
||||
<li>Guess the rule correctly to win the game</li>
|
||||
<li>The rule determines which card can be put down next</li>
|
||||
<li>Prove or disprove rules by testing next cards</li>
|
||||
<li>But putting down an incorrect card decreases your score by 2 and gives you 2 new cards.</li>
|
||||
<li>Empty your hand to increase your score.</li>
|
||||
<li>Every game will have a random rule chosen from around 300 rules</li>
|
||||
<li>Hints cost you 150 points.</li>
|
||||
<li>At zero points you lose the game.</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
<h5><strong>Hints:</strong></h5>
|
||||
<ul>
|
||||
<li>Try to disprove rules, those which remain must be the truth</li>
|
||||
<li>Don't be afraid to reveal the rule hints</li>
|
||||
<li>Don't spend too much time thinking before 6 cards have been played.</li>
|
||||
<li>If this rule is too hard restart the game to get a new rule</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
<h5><strong>Cards and values</strong> </h5>
|
||||
<div ng-controller="CardController as ec">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-repeat='key in ["key", "name", "value", "suit", "color", "royal", "face", "number","loop"]'>
|
||||
{{key}}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="card in ec.cards">
|
||||
<!-- <th>
|
||||
{{card.key}}
|
||||
</th> -->
|
||||
<td class=""card ng-repeat='key in ["key", "name", "value", "suit", "color", "royal", "face", "number","loop"]'>
|
||||
{{card[key]|boolToTick}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none">A card game where you work out the secret rule to determine which cards can be played next.</div>
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container-fluid">
|
||||
@@ -60,7 +138,7 @@
|
||||
<!-- </ul> -->
|
||||
<!-- </li> -->
|
||||
|
||||
<li><a href="#" data-toggle="modal" data-target="#cardModal">🂠 Game</a></li>
|
||||
<li><a href="#" id="cardModelToggle" data-toggle="modal" data-target="#cardModal">🂠 Help</a></li>
|
||||
<li><a href="#" data-toggle="modal" data-target="#myModal"><i class="fa fa-users"></i> About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -73,7 +151,7 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<i class="fa fa-cogs"></i> Hand
|
||||
<i class="fa fa-cogs"></i> Click a card
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
@@ -108,7 +186,16 @@
|
||||
<div id="column-lab" class="col-md-6 col-xs-8 col-no-padding-xs" ng-controller="StatsController as lc">
|
||||
|
||||
<div class="row status" ng-cloak>
|
||||
<div id="score-display" class="col-xs-12 text-center col-no-padding-xs">
|
||||
<div id="" class="col-xs-8 small text-center col-no-padding-xs">
|
||||
<p><p/>
|
||||
<b>There are four possible rules</b>
|
||||
<ol class="intro">
|
||||
<li>Test rules by guessing the next card</li>
|
||||
<li>Choose the correct rule to win (<a href="#" id="cardModelToggle" data-toggle="modal" data-target="#cardModal">more</a>)</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
<div id="score-display" class="col-xs-4 text-center col-no-padding-xs">
|
||||
|
||||
<div class="{{lc.lab.state.score<0?'bg-danger':''}} animate-increase animate-decrease" ><strong>Score</strong><br>{{ lc.lab.state.score | niceNumber }}</div>
|
||||
<div class="update-value " ng-model="lc.lab.state.score" cfs-score-change id="update-data"></div>
|
||||
@@ -166,7 +253,7 @@
|
||||
<div ng-click="dc.revealHint()" analytics-on="click" analytics-event="hint" class="col-md-12">
|
||||
<div class="panel panel-default left-list card-panel">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Hint</h3>
|
||||
<h3 class="panel-title">Buy a <b>hint</b></h3>
|
||||
<div ng-cloak> (-{{dc.hintCost}} score)</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@@ -324,72 +411,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="cardModal" tabindex="-1" role="dialog" aria-labelledby="cardModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="cardModelLabel">Help</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<p class="small bg-warning">This is a pre-release.</p>
|
||||
<p>
|
||||
|
||||
Cards For Science is a card game where you work out the secret rule. The rule decides which card can be played next so you play cards to test the rule.
|
||||
|
||||
<h5><strong>Credits</strong></h5>
|
||||
This game is based on <a href="http://www.logicmazes.com/games/eleusis/">Eleusis</a> by Robert Abbott and John Golden's <a href="http://www.logicmazes.com/games/eleusis/express.html">Eleusis</a> Express.
|
||||
|
||||
<h5><strong>Rules</strong></h5>
|
||||
<ul>
|
||||
<li>Guess the rule correctly to win the game</li>
|
||||
<li>The rule determines which card can be put down next</li>
|
||||
<li>Prove or disprove rules by testing next cards</li>
|
||||
<li>But putting down an incorrect card decreases your score by 2 and gives you 2 new cards.</li>
|
||||
<li>Empty your hand to increase your score.</li>
|
||||
<li>Every game will have a random rule chosen from around 300 rules</li>
|
||||
<li>Hints cost you 10 points.</li>
|
||||
<li>At zero points you lose the game.</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
<h5><strong>Hints:</strong></h5>
|
||||
<ul>
|
||||
<li>Try to disprove rules, those which remain must be the truth</li>
|
||||
<li>Don't be afraid to reveal the rule hints</li>
|
||||
<li>Don't spend too much time thinking before 6 cards have been played.</li>
|
||||
<li>If this rule is too hard restart the game to get a new rule</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
<h5><strong>Cards and values</strong> </h5>
|
||||
<div ng-controller="CardController as ec">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-repeat='key in ["key", "name", "value", "suit", "color", "royal", "face", "number","loop"]'>
|
||||
{{key}}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="card in ec.cards">
|
||||
<!-- <th>
|
||||
{{card.key}}
|
||||
</th> -->
|
||||
<td class=""card ng-repeat='key in ["key", "name", "value", "suit", "color", "royal", "face", "number","loop"]'>
|
||||
{{card[key]|boolToTick}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
// I want to show the help by default
|
||||
// document.getElementById('cardModelToggle').click()
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -276,7 +276,7 @@ var app = (function (Helpers,analytics,Game,Rules) {
|
||||
vm.ruleInfo = game.ruleInfo;
|
||||
vm.hints = game.hints;
|
||||
vm.limit = -12;
|
||||
vm.hintCost = 10;
|
||||
vm.hintCost = 150;
|
||||
vm.ruleCost = 300;
|
||||
vm.lastCards = game.lastCards;
|
||||
vm.incorrectCards = game.incorrectCards;
|
||||
|
||||
+56
-34
@@ -89,42 +89,64 @@ var Game = (function (Helpers, GameObjects, ObjectStorage,Rules,cards,achievemen
|
||||
this.dealHand();
|
||||
|
||||
// deal new initial cards that follow the rule
|
||||
this.lastCards.splice(0,this.lastCards.length);
|
||||
this.lastCards.push(angular.copy(_.sample(this.cards)));
|
||||
var error,i;
|
||||
for (i = 0; i < 52; i++) {
|
||||
if (this.lastCards.length>2) break; // stop here
|
||||
var card = angular.copy(_.sample(this.cards));
|
||||
var res;
|
||||
try{
|
||||
res = this.rule.test(card,this.lastCards,this.cards);
|
||||
} catch(e){
|
||||
error=e;
|
||||
// in case of an error just add a random card
|
||||
// this is probobly because it is looking back 2 or 3 cards
|
||||
// yet we only have 1
|
||||
this.lastCards.push(card);
|
||||
}
|
||||
if (res) this.lastCards.push(angular.copy(_.sample(this.cards)));
|
||||
}
|
||||
if (this.lastCards.length<3) {
|
||||
console.warn(
|
||||
'Could not deal cards for rule after:',
|
||||
i,
|
||||
this.rule.key,
|
||||
this.rule.options,
|
||||
this.rule.describe(),
|
||||
_.map(this.lastCards,'key'),
|
||||
error?error.message:''
|
||||
);
|
||||
// feck, just deal 3 random then
|
||||
this.lastCards.splice(0,this.lastCards.length);
|
||||
this.lastCards.push(angular.copy(_.sample(this.cards)));
|
||||
this.lastCards.push(angular.copy(_.sample(this.cards)));
|
||||
this.lastCards.push(angular.copy(_.sample(this.cards)));
|
||||
function getInitialCards(rule,cards){
|
||||
function _getInitialCards(rule,cards){
|
||||
var lastCards = [angular.copy(_.sample(cards))]
|
||||
var error,i;
|
||||
for (i = 0; i < 52; i++) {
|
||||
if (lastCards.length>2) break; // stop here
|
||||
var card = angular.copy(_.sample(cards));
|
||||
var res;
|
||||
try{
|
||||
res = rule.test(card,lastCards,cards);
|
||||
} catch(e){
|
||||
error=e;
|
||||
// in case of an error just add a random card
|
||||
// this is probobly because it is looking back 2 or 3 cards
|
||||
// yet we only have 1
|
||||
if (e instanceof TypeError && e.message.endsWith("of undefined"))
|
||||
lastCards.push(card);
|
||||
else
|
||||
throw e
|
||||
}
|
||||
if (res) lastCards.push(angular.copy(card));
|
||||
}
|
||||
if (lastCards.length<3) {
|
||||
console.warn(
|
||||
'Could not deal cards for rule after:',
|
||||
i,
|
||||
rule.key,
|
||||
rule.options,
|
||||
rule.describe(),
|
||||
_.map(lastCards,'key'),
|
||||
error?error.message:''
|
||||
);
|
||||
// feck, just deal 3 random then
|
||||
return null
|
||||
|
||||
} else {
|
||||
return lastCards
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < 100; i++) {
|
||||
var initialCards = _getInitialCards(rule,cards)
|
||||
if (initialCards) break
|
||||
}
|
||||
if (!initialCards) {
|
||||
throw new Error('Could not deal cards for rule after:' +' ' +
|
||||
i +' ' +
|
||||
this.rule.key +' ' +
|
||||
this.rule.options +' ' +
|
||||
this.rule.describe() +' ' +
|
||||
_.map(this.lastCards,'key') +' ' +
|
||||
error?error.message:'')
|
||||
}
|
||||
return initialCards
|
||||
}
|
||||
// this.lastCards.push.apply(this.lastCards,_.sampleSize(this.cards,3));
|
||||
|
||||
let initialCards = getInitialCards(this.rule,this.cards)
|
||||
this.lastCards.splice(0,this.lastCards.length);
|
||||
this.lastCards.push.apply(this.lastCards,initialCards);
|
||||
|
||||
this.ruleInfo.splice(0,this.ruleInfo.length);
|
||||
this.hints.splice(0,this.hints.length);
|
||||
|
||||
+3
-75
@@ -196,25 +196,7 @@
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
"key": "🂬",
|
||||
"name": "Knight",
|
||||
"value": 12,
|
||||
"suit": "Spades",
|
||||
"color": "Black",
|
||||
"royal": true,
|
||||
"face": true,
|
||||
"number": false,
|
||||
"red": false,
|
||||
"black": false,
|
||||
"even": true,
|
||||
"odd": false,
|
||||
"loop": false,
|
||||
"heart": false,
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
}, {
|
||||
"key": "🂭",
|
||||
"name": "Queen",
|
||||
"value": 13,
|
||||
@@ -448,25 +430,7 @@
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
"key": "🂼",
|
||||
"name": "Knight",
|
||||
"value": 12,
|
||||
"suit": "Hearts",
|
||||
"color": "Red",
|
||||
"royal": true,
|
||||
"face": true,
|
||||
"number": false,
|
||||
"red": false,
|
||||
"black": false,
|
||||
"even": true,
|
||||
"odd": false,
|
||||
"loop": false,
|
||||
"heart": false,
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
}, {
|
||||
"key": "🂽",
|
||||
"name": "Queen",
|
||||
"value": 13,
|
||||
@@ -700,24 +664,6 @@
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
"key": "🃌",
|
||||
"name": "Knight",
|
||||
"value": 12,
|
||||
"suit": "Diamonds",
|
||||
"color": "Red",
|
||||
"royal": true,
|
||||
"face": true,
|
||||
"number": false,
|
||||
"red": false,
|
||||
"black": false,
|
||||
"even": true,
|
||||
"odd": false,
|
||||
"loop": false,
|
||||
"heart": false,
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
"key": "🃍",
|
||||
"name": "Queen",
|
||||
@@ -952,25 +898,7 @@
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
"key": "🃜",
|
||||
"name": "Knight",
|
||||
"value": 12,
|
||||
"suit": "Clubs",
|
||||
"color": "Black",
|
||||
"royal": true,
|
||||
"face": true,
|
||||
"number": false,
|
||||
"red": false,
|
||||
"black": false,
|
||||
"even": true,
|
||||
"odd": false,
|
||||
"loop": false,
|
||||
"heart": false,
|
||||
"spade": false,
|
||||
"club": false,
|
||||
"diamond": false
|
||||
}, {
|
||||
},{
|
||||
"key": "🃝",
|
||||
"name": "Queen",
|
||||
"value": 13,
|
||||
|
||||
@@ -75,6 +75,7 @@ if (DEBUG){
|
||||
//);
|
||||
} else {
|
||||
plugins.push(
|
||||
new webpack.NoErrorsPlugin(),
|
||||
new webpack.optimize.DedupePlugin(),
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
uglifyJsPlugin
|
||||
|
||||
Reference in New Issue
Block a user