Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
288b54df3e | ||
|
|
198f0c1f49 | ||
|
|
87b8fe37a3 | ||
|
|
d23944584d | ||
|
|
e43d31b3e1 | ||
|
|
a1d5c899f4 | ||
|
|
6c4fea36c2 | ||
|
|
9bbcc73b33 |
18
README.md
18
README.md
@@ -6,13 +6,27 @@ Do zrobienia:
|
|||||||
|
|
||||||
|
|
||||||
- [x] wyświetlenie wszystkich żetonów dóbr istniejących w grze
|
- [x] wyświetlenie wszystkich żetonów dóbr istniejących w grze
|
||||||
- [ ] wyświetlenie bonusowych żetonów istniejących w grze (3, 4 i 5 kart)
|
|
||||||
- [x] wyświetlenie żetonu wielbłąda
|
- [x] wyświetlenie żetonu wielbłąda
|
||||||
- [x] przydzielenie żetonu wielbłąda przed wyświetleniem wyniku
|
- [x] przydzielenie żetonu wielbłąda przed wyświetleniem wyniku
|
||||||
- [ ] rozwiązywanie sprawy z remisem
|
- [ ] rozwiązywanie sprawy z remisem
|
||||||
- [ ] przydzielanie bonusów nawet jak nie żetonów danej karty
|
- [x] przydzielanie bonusów nawet jak nie żetonów danej karty
|
||||||
- [x] pobieranie żetonów po kliknięciu na żetonu
|
- [x] pobieranie żetonów po kliknięciu na żetonu
|
||||||
- [x] losowanie wartości bonusowych żetonów kart
|
- [x] losowanie wartości bonusowych żetonów kart
|
||||||
- [x] zliczanie punków
|
- [x] zliczanie punków
|
||||||
- [x] informowanie o zakończeniu rundy
|
- [x] informowanie o zakończeniu rundy
|
||||||
- [x] przydzielanie żetonu Maharadży
|
- [x] przydzielanie żetonu Maharadży
|
||||||
|
- [x] nie można wybrać więcej niż 7 monet na raz
|
||||||
|
- [x] minimum dwie karty złota, srebra i diamentu, bez limitu dla innych kart
|
||||||
|
- [x] kończenie rozgrywki w przypadku braku kart
|
||||||
|
- [x] pokazanie na przycisku przydziel że dodany zostanie bonus za dane zagranie lub nie
|
||||||
|
- [x] zmiana imion graczy
|
||||||
|
- [ ] wersja landscape
|
||||||
|
- [ ] offline first
|
||||||
|
- [ ] manifest.json
|
||||||
|
- [ ] trzymanie sprzedanych kart i zdobyych bonusow w tablicy gracza w sposób pozwalający na określenie jakiego typy karty i bonusy zostały zdobyte
|
||||||
|
- [ ] tryb nocny
|
||||||
|
- [ ] refaktoring
|
||||||
|
- [x] sass
|
||||||
|
- [x] menu dolne takie jak w natywnych aplikacjach
|
||||||
|
- [ ] anulowanie ruchu
|
||||||
|
- [ ] historia ruchów
|
||||||
88
bonus3.svg
Normal file
88
bonus3.svg
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<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="97.414101mm"
|
||||||
|
height="100.70018mm"
|
||||||
|
viewBox="0 0 97.414101 100.70018"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.1 r15371"
|
||||||
|
sodipodi:docname="3cardbonus3.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.4"
|
||||||
|
inkscape:cx="327.84053"
|
||||||
|
inkscape:cy="170.40039"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="837"
|
||||||
|
inkscape:window-x="1272"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4516"
|
||||||
|
originx="-21.034165"
|
||||||
|
originy="-129.61982" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<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>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-21.034166,-66.68)">
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="rect4485"
|
||||||
|
width="29.10417"
|
||||||
|
height="47.624996"
|
||||||
|
x="21.166666"
|
||||||
|
y="66.8125" />
|
||||||
|
<rect
|
||||||
|
y="90.624992"
|
||||||
|
x="52.916664"
|
||||||
|
height="47.624996"
|
||||||
|
width="29.10417"
|
||||||
|
id="rect4520"
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="rect4522"
|
||||||
|
width="29.10417"
|
||||||
|
height="47.624996"
|
||||||
|
x="84.666664"
|
||||||
|
y="114.4375" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
95
bonus4.svg
Normal file
95
bonus4.svg
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<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="97.414101mm"
|
||||||
|
height="100.70018mm"
|
||||||
|
viewBox="0 0 97.414101 100.70018"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.1 r15371"
|
||||||
|
sodipodi:docname="3cardbonus3.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.4"
|
||||||
|
inkscape:cx="327.84053"
|
||||||
|
inkscape:cy="170.40039"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="837"
|
||||||
|
inkscape:window-x="1272"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4516"
|
||||||
|
originx="-21.034165"
|
||||||
|
originy="-129.61982" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<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>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-21.034166,-66.68)">
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="rect4485"
|
||||||
|
width="29.10417"
|
||||||
|
height="47.624996"
|
||||||
|
x="34.395832"
|
||||||
|
y="66.812492" />
|
||||||
|
<rect
|
||||||
|
y="119.72916"
|
||||||
|
x="34.395832"
|
||||||
|
height="47.624996"
|
||||||
|
width="29.10417"
|
||||||
|
id="rect4520"
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="rect4522"
|
||||||
|
width="29.10417"
|
||||||
|
height="47.624996"
|
||||||
|
x="76.729164"
|
||||||
|
y="66.8125" />
|
||||||
|
<rect
|
||||||
|
y="119.72916"
|
||||||
|
x="76.729164"
|
||||||
|
height="47.624996"
|
||||||
|
width="29.10417"
|
||||||
|
id="rect4524"
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.3 KiB |
102
bonus5.svg
Normal file
102
bonus5.svg
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<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="97.414101mm"
|
||||||
|
height="100.70018mm"
|
||||||
|
viewBox="0 0 97.414101 100.70018"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.1 r15371"
|
||||||
|
sodipodi:docname="3cardbonus3.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.4"
|
||||||
|
inkscape:cx="327.84053"
|
||||||
|
inkscape:cy="170.40039"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="837"
|
||||||
|
inkscape:window-x="1272"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4516"
|
||||||
|
originx="-21.034165"
|
||||||
|
originy="-129.61982" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<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>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-21.034166,-66.68)">
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="rect4485"
|
||||||
|
width="29.10417"
|
||||||
|
height="47.624996"
|
||||||
|
x="21.166668"
|
||||||
|
y="66.8125" />
|
||||||
|
<rect
|
||||||
|
y="119.72916"
|
||||||
|
x="21.166668"
|
||||||
|
height="47.624996"
|
||||||
|
width="29.10417"
|
||||||
|
id="rect4520"
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="rect4522"
|
||||||
|
width="29.10417"
|
||||||
|
height="47.624996"
|
||||||
|
x="89.958328"
|
||||||
|
y="66.812492" />
|
||||||
|
<rect
|
||||||
|
y="119.72916"
|
||||||
|
x="89.958328"
|
||||||
|
height="47.624996"
|
||||||
|
width="29.10417"
|
||||||
|
id="rect4524"
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
y="93.270828"
|
||||||
|
x="55.5625"
|
||||||
|
height="47.624996"
|
||||||
|
width="29.10417"
|
||||||
|
id="rect4526"
|
||||||
|
style="opacity:1;fill:#66a5e8;fill-opacity:1;fill-rule:evenodd;stroke:#f3c9b1;stroke-width:0.26499999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.6 KiB |
25
css/grid-template.css
Normal file
25
css/grid-template.css
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
.container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
"player1container acceptcontainer player2container"
|
||||||
|
"leather leather leather"
|
||||||
|
"fabric fabric fabric"
|
||||||
|
"spice spice spice"
|
||||||
|
"silver silver silver"
|
||||||
|
"gold gold gold"
|
||||||
|
"diamond diamond diamond";
|
||||||
|
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: repeat(7, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (orientation: landscape){
|
||||||
|
/*.container {display: none; }*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.group.leather { grid-area: leather; }
|
||||||
|
.group.fabric { grid-area: fabric; }
|
||||||
|
.group.spice { grid-area: spice; }
|
||||||
|
.group.silver { grid-area: silver; }
|
||||||
|
.group.gold { grid-area: gold; }
|
||||||
|
.group.diamond { grid-area: diamond; }
|
||||||
182
css/style.css
182
css/style.css
@@ -11,6 +11,14 @@
|
|||||||
margin: 5px 0vh 5px 0vh;
|
margin: 5px 0vh 5px 0vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.group .coin.blank {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group .coin.blank.selected {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.group .coin.selected:first-child {
|
.group .coin.selected:first-child {
|
||||||
margin: 5px 0vh 5px -4vh;
|
margin: 5px 0vh 5px -4vh;
|
||||||
}
|
}
|
||||||
@@ -79,56 +87,95 @@
|
|||||||
background-size: 44%;
|
background-size: 44%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.players {
|
/* PLAYERS START */
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
}
|
|
||||||
|
|
||||||
.players .player {
|
.player {
|
||||||
border: 2px solid dodgerblue;
|
border: 2px solid dodgerblue;
|
||||||
padding: 0.5vh 4vh;
|
padding: 0.5vh 4vh;
|
||||||
margin: 1.5vh 0;
|
margin: 1.5vh auto;
|
||||||
|
width: 10vw;
|
||||||
color: #444;
|
color: #444;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
display: flex;
|
height: 5vh;
|
||||||
align-items: center;
|
width: 10vw;
|
||||||
height: 50px;
|
line-height: 5vh;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .player.selected {
|
.player.selected {
|
||||||
background: #6f9cc9;
|
background: #6f9cc9;
|
||||||
color: #f2eeee;
|
color: #f2eeee;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .accept {
|
.accept {
|
||||||
|
grid-area: acceptcontainer;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
border: 2px solid dodgerblue;
|
border: 2px solid dodgerblue;
|
||||||
margin: 1.5vh 0;
|
margin: 1.5vh auto;
|
||||||
height: 50px;
|
max-width: 100%;
|
||||||
align-items: center;
|
height: 5vh;
|
||||||
display: flex;
|
padding: 0.5vh 0vw;
|
||||||
padding: 0.5vh 4vh;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
background-color: #bedfff;
|
background-color: #bedfff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
line-height: 5vh;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
justify-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .accept.on {
|
.acceptcontainer .bonus {
|
||||||
|
height: 5vh;
|
||||||
|
width: 5vh;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid dodgerblue;
|
||||||
|
background: no-repeat #fff center center / 60% 60%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acceptcontainer .bonus.bonus5 {
|
||||||
|
background-image: url(../bonus5.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.acceptcontainer .bonus.bonus4 {
|
||||||
|
background-image: url(../bonus4.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.acceptcontainer .bonus.bonus3 {
|
||||||
|
background-image: url(../bonus3.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accept.on {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .player.player1 {
|
.accept.label {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .player.player2 {
|
.player1container {
|
||||||
|
grid-area: player1container;
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .player .score {
|
.player2container {
|
||||||
|
grid-area: player2container;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player.player1 {
|
||||||
|
}
|
||||||
|
|
||||||
|
.player.player2 {
|
||||||
|
}
|
||||||
|
|
||||||
|
.player .score {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 23px;
|
width: 23px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -141,7 +188,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.players .player .score:first-child {
|
.player .score:first-child {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,12 +205,17 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* PLAYERS END */
|
||||||
|
|
||||||
|
/* SCORE TABLE START */
|
||||||
|
|
||||||
.scoreTable.visible {
|
.scoreTable.visible {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scoreTable h1 {
|
.scoreTable h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-size: 10vh;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,12 +236,12 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.camel_section .nobody {
|
.camel_section .nobody {
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.camel_section .player1_camel.selected, .camel_section .player2_camel.selected, .camel_section .nobody.selected
|
.camel_section .player1_camel.selected, .camel_section .player2_camel.selected, .camel_section .nobody.selected {
|
||||||
{
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,3 +254,85 @@
|
|||||||
.score_section.show {
|
.score_section.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bonus_section {
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section.show {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player1_bonus {
|
||||||
|
text-align: right;
|
||||||
|
margin-right: 3.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player1_bonus .bonus3,.player1_bonus .bonus4,.player1_bonus .bonus5 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.player2_bonus {
|
||||||
|
margin-left: 3.5vh;
|
||||||
|
}
|
||||||
|
.bonus_section .player2_bonus, .bonus_section .player1_bonus {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section .player1_bonus span:first-child {
|
||||||
|
margin-left: -30px ;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section span:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section span {
|
||||||
|
height: 6vh;
|
||||||
|
width: 6vh;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: -30px ;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid dodgerblue;
|
||||||
|
background: no-repeat #fff center center / 60% 60%;
|
||||||
|
/*display: none;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section .bonus3 span {
|
||||||
|
background-image: url(../bonus3.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section .bonus4 span {
|
||||||
|
background-image: url(../bonus4.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section .bonus5 span {
|
||||||
|
background-image: url(../bonus5.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SCORE TABLE END */
|
||||||
|
|
||||||
|
/*.acceptcontainer .bonus {*/
|
||||||
|
/*height: 5vh;*/
|
||||||
|
/*width: 5vh;*/
|
||||||
|
/*display: inline-block;*/
|
||||||
|
/*margin: 0;*/
|
||||||
|
/*border-radius: 50%;*/
|
||||||
|
/*border: 1px solid dodgerblue;*/
|
||||||
|
/*background: no-repeat #fff center center / 60% 60%;*/
|
||||||
|
/*display: none;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.acceptcontainer .bonus.bonus5 {*/
|
||||||
|
/*background-image: url(../bonus5.svg);*/
|
||||||
|
/*}*/
|
||||||
|
/*.acceptcontainer .bonus.bonus4 {*/
|
||||||
|
/*background-image: url(../bonus4.svg);*/
|
||||||
|
/*}*/
|
||||||
|
/*.acceptcontainer .bonus.bonus3 {*/
|
||||||
|
/*background-image: url(../bonus3.svg);*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
|||||||
60
index.html
60
index.html
@@ -6,8 +6,10 @@
|
|||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/style.css"/>
|
<!--<link rel="stylesheet" href="css/reset.css"/>-->
|
||||||
<link rel="stylesheet" href="css/reset.css"/>
|
<!--<link rel="stylesheet" href="css/grid-template.css"/>-->
|
||||||
|
<!--<link rel="stylesheet" href="css/style.css"/>-->
|
||||||
|
<link rel="stylesheet" href="sass-css/index.css"/>
|
||||||
<script src="js/script.js"></script>
|
<script src="js/script.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
@@ -27,19 +29,29 @@
|
|||||||
var player1 = new player('Kicia', 1);
|
var player1 = new player('Kicia', 1);
|
||||||
var player2 = new player('Cysio', 2);
|
var player2 = new player('Cysio', 2);
|
||||||
jaipur = new game(player1, player2, board);
|
jaipur = new game(player1, player2, board);
|
||||||
|
|
||||||
jaipur.init();
|
jaipur.init();
|
||||||
|
|
||||||
console.info(jaipur.isRoundOver());
|
modal = new modal();
|
||||||
|
modal.init();
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="players">
|
<div class="player1container">
|
||||||
<div class="player player1" data-player="1">Kicia</div>
|
<div class="player player1" data-player="1">Kicia</div>
|
||||||
<div class="accept">Przydziel</div>
|
</div>
|
||||||
|
<div class="acceptcontainer">
|
||||||
|
<div class="accept">
|
||||||
|
<span class="label">Przydziel</span>
|
||||||
|
<span class="bonus bonus5"></span>
|
||||||
|
<span class="bonus bonus4"></span>
|
||||||
|
<span class="bonus bonus3"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="player2container">
|
||||||
<div class="player player2" data-player="2">Cysio</div>
|
<div class="player player2" data-player="2">Cysio</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -92,12 +104,15 @@
|
|||||||
</span><span class="coin diamond" data-group="diamond">7</span>
|
</span><span class="coin diamond" data-group="diamond">7</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="menu">
|
||||||
|
<a href="#" id="players">gracze</a>
|
||||||
|
<a href="#" id="endturn">zakończ turę</a>
|
||||||
|
<a href="#" id="restart">restart</a>
|
||||||
|
<a href="#" id="share">udostępnij</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="scoreTable">
|
<div id="scoreTable">
|
||||||
<h1>Wynik</h1>
|
<h1>Wynik</h1>
|
||||||
|
|
||||||
|
|
||||||
<div class="players_section">
|
<div class="players_section">
|
||||||
<div class="player1_name">Kicia</div>
|
<div class="player1_name">Kicia</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
@@ -112,7 +127,32 @@
|
|||||||
<div class="player1_score">0</div>
|
<div class="player1_score">0</div>
|
||||||
<div class="separator">:</div>
|
<div class="separator">:</div>
|
||||||
<div class="player2_score">0</div>
|
<div class="player2_score">0</div>
|
||||||
|
</div>
|
||||||
|
<div class="bonus_section">
|
||||||
|
<div class="player1_bonus">
|
||||||
|
<div class="bonus3"></div>
|
||||||
|
<div class="bonus4"></div>
|
||||||
|
<div class="bonus5"></div>
|
||||||
|
</div>
|
||||||
|
<div class="player2_bonus">
|
||||||
|
<div class="bonus3"></div>
|
||||||
|
<div class="bonus4"></div>
|
||||||
|
<div class="bonus5"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="playerNames" class="modal">
|
||||||
|
<div class="close">x</div>
|
||||||
|
<div class="modal_content">
|
||||||
|
<div>
|
||||||
|
<h1>Zmiana nazw użytkowników</h1>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input id="player1_name" placeholder="gracz 1">
|
||||||
|
<input id="player2_name" placeholder="gracz 2">
|
||||||
|
<span id="change_name">zmień</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
191
js/script.js
191
js/script.js
@@ -1,9 +1,26 @@
|
|||||||
|
|
||||||
function coin(value, group) {
|
function coin(value, group) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.group = group;
|
this.group = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Bonus(group, value) {
|
||||||
|
this.value = value;
|
||||||
|
this.group = group;
|
||||||
|
}
|
||||||
|
|
||||||
|
function modal() {
|
||||||
|
|
||||||
|
this.init = function () {
|
||||||
|
this.handleClose();
|
||||||
|
};
|
||||||
|
this.handleClose = function () {
|
||||||
|
document.querySelector('.modal .close').addEventListener('click', function () {
|
||||||
|
this.parentNode.classList.toggle('on');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function player(name, id) {
|
function player(name, id) {
|
||||||
this.score = 0;
|
this.score = 0;
|
||||||
this.roundsWon = 0;
|
this.roundsWon = 0;
|
||||||
@@ -12,8 +29,9 @@ function player(name, id) {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.selector = '.player.player' + id;
|
this.selector = '.player.player' + id;
|
||||||
|
this.scoreSelector = '.player' + id + '_name';
|
||||||
|
|
||||||
this.hasCamelCoin = true;
|
this.hasCamelCoin = false;
|
||||||
|
|
||||||
this.calculateScore = function () {
|
this.calculateScore = function () {
|
||||||
var score = 0;
|
var score = 0;
|
||||||
@@ -21,7 +39,7 @@ function player(name, id) {
|
|||||||
score += this.coins[i];
|
score += this.coins[i];
|
||||||
}
|
}
|
||||||
for (var i in this.bonus) {
|
for (var i in this.bonus) {
|
||||||
score += this.bonus[i];
|
score += this.bonus[i].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hasCamelCoin) {
|
if (this.hasCamelCoin) {
|
||||||
@@ -30,6 +48,16 @@ function player(name, id) {
|
|||||||
return this.score = score;
|
return this.score = score;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setName = function (name) {
|
||||||
|
this.name = name;
|
||||||
|
this.updateNames();
|
||||||
|
};
|
||||||
|
|
||||||
|
this.updateNames = function () {
|
||||||
|
document.querySelector(this.selector).innerText = this.name;
|
||||||
|
document.querySelector(this.scoreSelector).innerText = this.name;
|
||||||
|
};
|
||||||
|
|
||||||
this.wonRound = function () {
|
this.wonRound = function () {
|
||||||
this.roundsWon += 1;
|
this.roundsWon += 1;
|
||||||
};
|
};
|
||||||
@@ -81,7 +109,6 @@ function game(player1, player2, board) {
|
|||||||
jaipur.showAcceptButton();
|
jaipur.showAcceptButton();
|
||||||
} else if (playerId == 2) {
|
} else if (playerId == 2) {
|
||||||
jaipur.activePlayer = this.player2;
|
jaipur.activePlayer = this.player2;
|
||||||
|
|
||||||
document.querySelector('.player.player1').classList.remove("selected");
|
document.querySelector('.player.player1').classList.remove("selected");
|
||||||
document.querySelector('.player.player2').classList.add("selected");
|
document.querySelector('.player.player2').classList.add("selected");
|
||||||
jaipur.showAcceptButton();
|
jaipur.showAcceptButton();
|
||||||
@@ -89,7 +116,6 @@ function game(player1, player2, board) {
|
|||||||
document.querySelector('.player.player1').classList.remove("selected");
|
document.querySelector('.player.player1').classList.remove("selected");
|
||||||
document.querySelector('.player.player2').classList.remove("selected");
|
document.querySelector('.player.player2').classList.remove("selected");
|
||||||
jaipur.activePlayer = false;
|
jaipur.activePlayer = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.activePlayer;
|
return this.activePlayer;
|
||||||
@@ -100,6 +126,7 @@ function game(player1, player2, board) {
|
|||||||
this.initializeAcceptButton();
|
this.initializeAcceptButton();
|
||||||
this.initializeCoins();
|
this.initializeCoins();
|
||||||
this.initializeCamels();
|
this.initializeCamels();
|
||||||
|
this.initializeMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.reset = function () {
|
this.reset = function () {
|
||||||
@@ -116,12 +143,37 @@ function game(player1, player2, board) {
|
|||||||
var emptyRows = 0;
|
var emptyRows = 0;
|
||||||
for (var i in board.goods) {
|
for (var i in board.goods) {
|
||||||
emptyRows += !board.goods[i].length ? 1 : 0;
|
emptyRows += !board.goods[i].length ? 1 : 0;
|
||||||
|
|
||||||
console.info(board.goods[i]);
|
|
||||||
}
|
}
|
||||||
return emptyRows >= 3;
|
return emptyRows >= 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.initializeMenu = function () {
|
||||||
|
document.querySelector('#players').addEventListener('click', function () {
|
||||||
|
jaipur.playerNamesModal();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
document.querySelector('#change_name').addEventListener('click', function () {
|
||||||
|
jaipur.player1.setName(document.querySelector('#player1_name').value);
|
||||||
|
jaipur.player2.setName(document.querySelector('#player2_name').value);
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector('#endturn').addEventListener('click', function () {
|
||||||
|
jaipur.endTurn();
|
||||||
|
});
|
||||||
|
document.querySelector('#restart').addEventListener('click', function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
document.querySelector('#share').addEventListener('click', function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
this.playerNamesModal = function () {
|
||||||
|
document.querySelector('#playerNames').classList.toggle('on');
|
||||||
|
};
|
||||||
|
|
||||||
this.initializePlayerButtons = function () {
|
this.initializePlayerButtons = function () {
|
||||||
document.querySelector('.player.player1').addEventListener('click', function () {
|
document.querySelector('.player.player1').addEventListener('click', function () {
|
||||||
jaipur.setActivePlayer(1)
|
jaipur.setActivePlayer(1)
|
||||||
@@ -131,16 +183,52 @@ function game(player1, player2, board) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//pokazuje ikonkę bonusowej monety przy przycisku przydziel
|
||||||
|
this.showBonusCoins = function () {
|
||||||
|
var selectedCoins = document.querySelectorAll('.coin.selected').length;
|
||||||
|
jaipur.hideBonusCoins();
|
||||||
|
if (selectedCoins >= 5 && !!jaipur.board.bonus.five.length) {
|
||||||
|
document.querySelector('.bonus5').style.display = 'block';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (selectedCoins == 4 && !!jaipur.board.bonus.four.length) {
|
||||||
|
document.querySelector('.bonus4').style.display = 'block';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (selectedCoins == 3 && !!jaipur.board.bonus.three.length) {
|
||||||
|
document.querySelector('.bonus3').style.display = 'block';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
this.showAcceptButton = function () {
|
this.showAcceptButton = function () {
|
||||||
if (!!jaipur.activePlayer && !!document.querySelector('.coin.selected')) {
|
|
||||||
|
if (!!jaipur.activePlayer && !!document.querySelector('.coin.selected') &&
|
||||||
|
((document.querySelectorAll('.coin.selected').length >= 2 &&
|
||||||
|
['silver', 'gold', 'diamond'].indexOf(jaipur.selectedCointType) > -1
|
||||||
|
) || (
|
||||||
|
document.querySelectorAll('.coin.selected').length >= 1 &&
|
||||||
|
['fabric', 'spice', 'leather'].indexOf(jaipur.selectedCointType) > -1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) {
|
||||||
document.querySelector('.accept').style.visibility = 'visible';
|
document.querySelector('.accept').style.visibility = 'visible';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.hideAcceptButton = function () {
|
this.hideAcceptButton = function () {
|
||||||
document.querySelector('.accept').style.visibility = 'hidden';
|
document.querySelector('.accept').style.visibility = 'hidden';
|
||||||
|
jaipur.hideBonusCoins();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.hideBonusCoins = function () {
|
||||||
|
document.querySelector('.bonus5').style.display = 'none';
|
||||||
|
document.querySelector('.bonus4').style.display = 'none';
|
||||||
|
document.querySelector('.bonus3').style.display = 'none';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
this.camelClick = function (player) {
|
this.camelClick = function (player) {
|
||||||
document.querySelector('.nobody').classList.remove('selected');
|
document.querySelector('.nobody').classList.remove('selected');
|
||||||
document.querySelector('.player1_camel').classList.remove('selected');
|
document.querySelector('.player1_camel').classList.remove('selected');
|
||||||
@@ -163,14 +251,21 @@ function game(player1, player2, board) {
|
|||||||
jaipur.player1.calculateScore();
|
jaipur.player1.calculateScore();
|
||||||
jaipur.player2.calculateScore();
|
jaipur.player2.calculateScore();
|
||||||
jaipur.showScore();
|
jaipur.showScore();
|
||||||
|
jaipur.showBonus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.showBonus = function () {
|
||||||
|
document.querySelector('.bonus_section').classList.add('show');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
this.coinClick = function () {
|
this.coinClick = function () {
|
||||||
|
|
||||||
if (!jaipur.selectedCointType) {
|
if (!jaipur.selectedCointType) {
|
||||||
jaipur.selectedCointType = this.dataset.group;
|
jaipur.selectedCointType = this.dataset.group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (jaipur.selectedCointType == this.dataset.group) {
|
if (jaipur.selectedCointType == this.dataset.group) {
|
||||||
|
|
||||||
//ustawienie active inactive na wszystkich grupach
|
//ustawienie active inactive na wszystkich grupach
|
||||||
@@ -187,6 +282,14 @@ function game(player1, player2, board) {
|
|||||||
//wyłaczenie selected na ostatniej wybranym żetonie
|
//wyłaczenie selected na ostatniej wybranym żetonie
|
||||||
document.querySelector('.coin.selected.' + this.dataset.group).classList.remove('selected');
|
document.querySelector('.coin.selected.' + this.dataset.group).classList.remove('selected');
|
||||||
|
|
||||||
|
|
||||||
|
//usunięcie przycisku przydziel jeśli zdejmujemy żetony i jest ich mniej wybranych niż dwa
|
||||||
|
//w przypadku złota, srebra czy diamentów
|
||||||
|
if ((document.querySelectorAll('.coin.selected').length < 2 &&
|
||||||
|
['silver', 'gold', 'diamond'].indexOf(jaipur.selectedCointType) > -1 )) {
|
||||||
|
jaipur.hideAcceptButton();
|
||||||
|
}
|
||||||
|
|
||||||
//usunięcie blokady wybranego typu żetonu
|
//usunięcie blokady wybranego typu żetonu
|
||||||
if (document.querySelectorAll('.coin.selected.' + this.dataset.group).length == 0) {
|
if (document.querySelectorAll('.coin.selected.' + this.dataset.group).length == 0) {
|
||||||
jaipur.selectedCointType = false;
|
jaipur.selectedCointType = false;
|
||||||
@@ -195,22 +298,49 @@ function game(player1, player2, board) {
|
|||||||
}
|
}
|
||||||
jaipur.hideAcceptButton();
|
jaipur.hideAcceptButton();
|
||||||
}
|
}
|
||||||
|
jaipur.removeBlankCoin(jaipur.selectedCointType);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
//jesli jest już wybranych 7 lub więcej monet to nie można więcej bo to max
|
||||||
|
if (document.querySelectorAll('.coin.selected.' + jaipur.selectedCointType).length >= 7) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//ustawienie selected na elemencie z kliniętej grupy
|
//ustawienie selected na elemencie z kliniętej grupy
|
||||||
var coinsFromRow = document.querySelectorAll('.coin.' + this.dataset.group + ':not(.selected)');
|
var coinsFromRow = document.querySelectorAll('.coin.' + this.dataset.group + ':not(.selected)');
|
||||||
[].slice.call(coinsFromRow).pop().classList.add('selected');
|
[].slice.call(coinsFromRow).pop().classList.add('selected');
|
||||||
jaipur.showAcceptButton();
|
jaipur.showAcceptButton();
|
||||||
|
|
||||||
|
|
||||||
|
//dodanie monety o wartości zero jeśli wybrano wszystkie monety z danej grupy
|
||||||
|
if (!!document.querySelectorAll('.coin.' + this.selectedCointType + ':not(.selected)').length == 0) {
|
||||||
|
jaipur.addBlankCoin(this.selectedCointType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
jaipur.showBonusCoins();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.addBlankCoin = function (groupName) {
|
||||||
|
var blankCoin = document.createElement('span');
|
||||||
|
blankCoin.classList.add('coin');
|
||||||
|
blankCoin.classList.add(groupName);
|
||||||
|
blankCoin.classList.add('blank');
|
||||||
|
blankCoin.innerText = '0';
|
||||||
|
blankCoin.dataset.group = groupName;
|
||||||
|
blankCoin.addEventListener('click', jaipur.coinClick);
|
||||||
|
var firstElementInGroup = document.querySelector('.coin.' + groupName);
|
||||||
|
document.querySelector('.group.' + groupName).insertBefore(blankCoin, firstElementInGroup);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.removeBlankCoin = function (groupName) {
|
||||||
|
if (!!document.querySelector('.coin.blank.' + groupName))
|
||||||
|
document.querySelector('.coin.blank.' + groupName).remove();
|
||||||
|
};
|
||||||
|
|
||||||
this.showScoreBoard = function () {
|
this.showScoreBoard = function () {
|
||||||
|
document.querySelector('#scoreTable').classList.add('visible');
|
||||||
document.querySelector('.scoreTable').classList.add('visible');
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.showScore = function () {
|
this.showScore = function () {
|
||||||
@@ -232,28 +362,29 @@ function game(player1, player2, board) {
|
|||||||
var group = coins[i].dataset.group;
|
var group = coins[i].dataset.group;
|
||||||
jaipur.board.goods[group].pop();
|
jaipur.board.goods[group].pop();
|
||||||
|
|
||||||
// jaipur.activePlayer.coins.push({ value: parseInt(coins[i].innerText), type: 'goods', group: group});
|
|
||||||
jaipur.activePlayer.coins.push(parseInt(coins[i].innerText));
|
jaipur.activePlayer.coins.push(parseInt(coins[i].innerText));
|
||||||
coins[i].remove();
|
coins[i].remove();
|
||||||
}
|
}
|
||||||
|
//przydzielanie bonusu
|
||||||
var bonus = false;
|
var bonus = false;
|
||||||
if (coins.length == 3) {
|
if (coins.length == 3) {
|
||||||
var bonusGroup = 'three';
|
var bonusGroup = 'three';
|
||||||
bonus = jaipur.board.bonus.three.pop()
|
bonus = new Bonus(3, jaipur.board.bonus.three.pop()); //{3: jaipur.board.bonus.three.pop()};
|
||||||
|
|
||||||
} else if (coins.length == 4) {
|
} else if (coins.length == 4) {
|
||||||
var bonusGroup = 'four';
|
var bonusGroup = 'four';
|
||||||
bonus = jaipur.board.bonus.four.pop()
|
bonus = new Bonus(4, jaipur.board.bonus.four.pop()); //{3: jaipur.board.bonus.three.pop()};
|
||||||
|
// bonus = {4: jaipur.board.bonus.four.pop()};
|
||||||
} else if (coins.length >= 5) {
|
} else if (coins.length >= 5) {
|
||||||
var bonusGroup = 'five';
|
var bonusGroup = 'five';
|
||||||
bonus = jaipur.board.bonus.five.pop()
|
bonus = new Bonus(5, jaipur.board.bonus.five.pop()); //{3: jaipur.board.bonus.three.pop()};
|
||||||
|
// bonus = {5: jaipur.board.bonus.five.pop()};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!bonus) {
|
if (!!bonus) {
|
||||||
// { value: parseInt(coins[i].innerText), type: 'goods', group: group}
|
|
||||||
// jaipur.activePlayer.bonus.push({ value: parseInt(coins[i].innerText), type: 'goods', group: group});
|
|
||||||
jaipur.activePlayer.bonus.push(bonus);
|
jaipur.activePlayer.bonus.push(bonus);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
|
|
||||||
var groups = document.querySelectorAll('.group');
|
var groups = document.querySelectorAll('.group');
|
||||||
jaipur.selectedCointType = false;
|
jaipur.selectedCointType = false;
|
||||||
@@ -263,11 +394,31 @@ function game(player1, player2, board) {
|
|||||||
jaipur.hideAcceptButton();
|
jaipur.hideAcceptButton();
|
||||||
jaipur.setActivePlayer(false);
|
jaipur.setActivePlayer(false);
|
||||||
if (jaipur.isRoundOver()) {
|
if (jaipur.isRoundOver()) {
|
||||||
jaipur.showScoreBoard();
|
jaipur.endTurn();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.endTurn = function () {
|
||||||
|
jaipur.showScoreBoard();
|
||||||
|
jaipur.drawBonusCoins();
|
||||||
|
};
|
||||||
|
|
||||||
|
this.drawBonusCoins = function () {
|
||||||
|
for (var i in jaipur.player1.bonus) {
|
||||||
|
var group = document.querySelector('.player1_bonus .bonus' + jaipur.player1.bonus[i].group);
|
||||||
|
var bonusCoin = document.createElement("span");
|
||||||
|
group.appendChild(bonusCoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (var i in jaipur.player2.bonus) {
|
||||||
|
var group = document.querySelector('.player2_bonus .bonus' + jaipur.player2.bonus[i].group);
|
||||||
|
var bonusCoin = document.createElement("span");
|
||||||
|
group.appendChild(bonusCoin);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
this.initializeCamels = function () {
|
this.initializeCamels = function () {
|
||||||
|
|
||||||
|
|||||||
565
sass-css/index.css
Normal file
565
sass-css/index.css
Normal file
@@ -0,0 +1,565 @@
|
|||||||
|
/* http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
v2.0 | 20110126
|
||||||
|
License: none (public domain)
|
||||||
|
*/
|
||||||
|
/* line 6, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
font: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
/* line 27, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 31, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 34, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 37, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 40, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_reset.scss */
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 1, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas: "player1container acceptcontainer player2container"
|
||||||
|
"leather leather leather"
|
||||||
|
"fabric fabric fabric"
|
||||||
|
"spice spice spice"
|
||||||
|
"silver silver silver"
|
||||||
|
"gold gold gold"
|
||||||
|
"diamond diamond diamond"
|
||||||
|
"menu menu menu";
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: repeat(8, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (orientation: landscape) {
|
||||||
|
/*.container {display: none; }*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 21, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.group.leather {
|
||||||
|
grid-area: leather;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 22, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.group.fabric {
|
||||||
|
grid-area: fabric;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 23, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.group.spice {
|
||||||
|
grid-area: spice;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 24, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.group.silver {
|
||||||
|
grid-area: silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 25, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.group.gold {
|
||||||
|
grid-area: gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 26, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.group.diamond {
|
||||||
|
grid-area: diamond;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 29, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.player1container {
|
||||||
|
grid-area: player1container;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 30, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
.player2container {
|
||||||
|
grid-area: player2container;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 31, C:/Users/k/Desktop/jaipur-score/sass/_grid.scss */
|
||||||
|
#menu {
|
||||||
|
grid-area: menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 1, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 7, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#menu {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 13, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#menu a {
|
||||||
|
max-width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 6vh;
|
||||||
|
color: #666;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 1vw;
|
||||||
|
display: inline-block;
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
/* line 13, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#menu a {
|
||||||
|
background: #ddd;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 28, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#menu a:hover {
|
||||||
|
background-color: #eee;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PLAYERS START */
|
||||||
|
/* line 38, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.container {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 50, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.acceptcontainer .accept {
|
||||||
|
grid-area: acceptcontainer;
|
||||||
|
visibility: hidden;
|
||||||
|
border: 2px solid dodgerblue;
|
||||||
|
margin: 1.5vh auto;
|
||||||
|
max-width: 100%;
|
||||||
|
height: 5vh;
|
||||||
|
padding: 0.5vh 0vw;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #bedfff;
|
||||||
|
cursor: pointer;
|
||||||
|
line-height: 5vh;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
justify-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 67, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.acceptcontainer .accept.on {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 72, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.acceptcontainer .bonus {
|
||||||
|
height: 5vh;
|
||||||
|
width: 5vh;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid dodgerblue;
|
||||||
|
background: no-repeat #fff center center/60% 60%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 83, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.acceptcontainer .bonus.bonus3 {
|
||||||
|
background-image: url(../bonus3.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 83, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.acceptcontainer .bonus.bonus4 {
|
||||||
|
background-image: url(../bonus4.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 83, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.acceptcontainer .bonus.bonus5 {
|
||||||
|
background-image: url(../bonus5.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 90, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.player {
|
||||||
|
border: 2px solid dodgerblue;
|
||||||
|
padding: 0.5vh 0;
|
||||||
|
margin: 1.5vh 1vw;
|
||||||
|
color: #444;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 2px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
height: 5vh;
|
||||||
|
line-height: 5vh;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 103, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.player.selected {
|
||||||
|
background: #6f9cc9;
|
||||||
|
color: #f2eeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 108, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.player .score {
|
||||||
|
height: 50px;
|
||||||
|
width: 23px;
|
||||||
|
display: inline-block;
|
||||||
|
background-image: none;
|
||||||
|
background-size: auto auto;
|
||||||
|
margin: 0 5px;
|
||||||
|
background-image: url(../maharaja.svg);
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 119, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.player .score:first-child {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PLAYERS END */
|
||||||
|
/* line 127, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
* {
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SCORE TABLE START */
|
||||||
|
/* line 132, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable {
|
||||||
|
width: 90vw;
|
||||||
|
background: #fff;
|
||||||
|
content: "";
|
||||||
|
height: 70vh;
|
||||||
|
position: absolute;
|
||||||
|
top: 15vh;
|
||||||
|
left: 5vw;
|
||||||
|
box-shadow: 0 0 207px #000000;
|
||||||
|
border: 3px solid #ccc;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 144, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 10vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 148, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable.visible {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 152, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .score_section {
|
||||||
|
display: none;
|
||||||
|
font-size: 35px;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 157, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .score_section.show {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 162, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section {
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 165, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section.show {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 170, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .players_section, #scoreTable .camel_section {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 177, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .camel_section .player1_camel, #scoreTable .camel_section .player2_camel {
|
||||||
|
background: url("../camel.svg") no-repeat 0 0/10vh 10vh;
|
||||||
|
height: 10vh;
|
||||||
|
width: 10vh;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 185, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .camel_section .nobody {
|
||||||
|
opacity: 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 189, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .camel_section .player1_camel.selected, #scoreTable .camel_section .player2_camel.selected, #scoreTable .camel_section .nobody.selected {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 193, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .player1_bonus {
|
||||||
|
text-align: right;
|
||||||
|
margin-right: 3.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 198, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .player1_bonus .bonus3, #scoreTable .player1_bonus .bonus4, #scoreTable .player1_bonus .bonus5 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 204, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section span:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 207, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section span {
|
||||||
|
height: 6vh;
|
||||||
|
width: 6vh;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: -30px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid dodgerblue;
|
||||||
|
background: no-repeat #fff center center / 60% 60%;
|
||||||
|
/*display: none;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 218, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section .player1_bonus span:first-child {
|
||||||
|
margin-left: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 223, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section .player2_bonus, #scoreTable .bonus_section .player1_bonus {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 227, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section .player2_bonus {
|
||||||
|
margin-left: 3.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 232, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section .bonus3 span {
|
||||||
|
background-image: url(../bonus3.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 232, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section .bonus4 span {
|
||||||
|
background-image: url(../bonus4.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 232, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
#scoreTable .bonus_section .bonus5 span {
|
||||||
|
background-image: url(../bonus5.svg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MODAL */
|
||||||
|
/* line 242, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 75vw;
|
||||||
|
left: 12.5vw;
|
||||||
|
top: 25vh;
|
||||||
|
height: 50vh;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 253, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal .close {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 2.5vh;
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 262, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal .close:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 268, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal .modal_content {
|
||||||
|
padding: 3vw 3vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 274, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal .modal_content h1 {
|
||||||
|
font-size: 4vh;
|
||||||
|
margin-bottom: 5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 278, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal .modal_content input {
|
||||||
|
padding: 5px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 282, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal .modal_content .submit {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 288, C:/Users/k/Desktop/jaipur-score/sass/_light.scss */
|
||||||
|
.modal.on {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** PLAYER NAMES MODAL */
|
||||||
|
/* line 1, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 3, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group.inactive {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 6, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin {
|
||||||
|
border-radius: 90px;
|
||||||
|
display: inline-block;
|
||||||
|
height: 9vh;
|
||||||
|
width: 9vh;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
margin: 5px 0vh 5px -4vh;
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
background-position: center 72%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
color: #000;
|
||||||
|
cursor: pointer;
|
||||||
|
text-shadow: 0 0 2px #fff;
|
||||||
|
font-size: 3vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 22, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin:first-child {
|
||||||
|
margin: 5px 0vh 5px 0vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 25, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.selected {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 29, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.blank {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 31, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.blank.selected {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 33, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.blank.selected:first-child {
|
||||||
|
margin: 5px 0vh 5px -4vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.leather {
|
||||||
|
border-color: saddlebrown;
|
||||||
|
background-image: url(../leather.svg);
|
||||||
|
background-size: 45%;
|
||||||
|
background-color: burlywood;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.fabric {
|
||||||
|
border-color: purple;
|
||||||
|
background-image: url(../fabric.svg);
|
||||||
|
background-size: 71%;
|
||||||
|
background-color: #f5d6f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.spice {
|
||||||
|
border-color: forestgreen;
|
||||||
|
background-image: url(../spice.svg);
|
||||||
|
background-size: 60%;
|
||||||
|
background-color: #dff9b6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.silver {
|
||||||
|
border-color: silver;
|
||||||
|
background-image: url(../silver.svg);
|
||||||
|
background-size: 44%;
|
||||||
|
background-color: #879fc6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.gold {
|
||||||
|
border-color: goldenrod;
|
||||||
|
background-image: url(../gold.svg);
|
||||||
|
background-size: 40%;
|
||||||
|
background-color: #fcf4ca;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* line 45, C:/Users/k/Desktop/jaipur-score/sass/_coins.scss */
|
||||||
|
.group .coin.diamond {
|
||||||
24
sass-css/index.map
Normal file
24
sass-css/index.map
Normal file
File diff suppressed because one or more lines are too long
53
sass/_coins.scss
Normal file
53
sass/_coins.scss
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
.group {
|
||||||
|
clear: both;
|
||||||
|
&.inactive {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
.coin {
|
||||||
|
border-radius: 90px;
|
||||||
|
display: inline-block;
|
||||||
|
height: 9vh;
|
||||||
|
width: 9vh;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
margin: 5px 0vh 5px -4vh;
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
background-position: center 72%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
color: $coin-text-color;
|
||||||
|
cursor: pointer;
|
||||||
|
text-shadow: 0 0 2px #fff;
|
||||||
|
font-size: 3vh;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin: 5px 0vh 5px 0vh;
|
||||||
|
}
|
||||||
|
&.selected {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.blank {
|
||||||
|
opacity: 0.7;
|
||||||
|
&.selected {
|
||||||
|
opacity: 1;
|
||||||
|
&:first-child {
|
||||||
|
margin: 5px 0vh 5px -4vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $icon, $border_color, $background_color, $background_size in (leather, saddlebrown, burlywood, 45%),
|
||||||
|
(fabric, purple, #f5d6f5, 71%),
|
||||||
|
(spice, forestgreen, #dff9b6, 60%),
|
||||||
|
(silver, silver, #879fc6, 44%),
|
||||||
|
(gold, goldenrod, #fcf4ca, 40%),
|
||||||
|
(diamond, darkred, #f66282, 48%), {
|
||||||
|
&.#{$icon} {
|
||||||
|
border-color: #{$border_color};
|
||||||
|
background-image: url(../#{$icon}.svg);
|
||||||
|
background-size: #{$background_size};
|
||||||
|
background-color: #{$background_color};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
0
sass/_dark.scss
Normal file
0
sass/_dark.scss
Normal file
32
sass/_grid.scss
Normal file
32
sass/_grid.scss
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
.container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
"player1container acceptcontainer player2container"
|
||||||
|
"leather leather leather"
|
||||||
|
"fabric fabric fabric"
|
||||||
|
"spice spice spice"
|
||||||
|
"silver silver silver"
|
||||||
|
"gold gold gold"
|
||||||
|
"diamond diamond diamond"
|
||||||
|
"menu menu menu";
|
||||||
|
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: repeat(8, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (orientation: landscape){
|
||||||
|
/*.container {display: none; }*/
|
||||||
|
}
|
||||||
|
.group {
|
||||||
|
&.leather { grid-area: leather; }
|
||||||
|
&.fabric { grid-area: fabric; }
|
||||||
|
&.spice { grid-area: spice; }
|
||||||
|
&.silver { grid-area: silver; }
|
||||||
|
&.gold { grid-area: gold; }
|
||||||
|
&.diamond { grid-area: diamond; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.player1container {grid-area: player1container; }
|
||||||
|
.player2container {grid-area: player2container;}
|
||||||
|
#menu { grid-area: menu; }
|
||||||
|
|
||||||
297
sass/_light.scss
Normal file
297
sass/_light.scss
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
a {
|
||||||
|
max-width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 6vh;
|
||||||
|
color: $menu-color;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 1vw;
|
||||||
|
display: inline-block;
|
||||||
|
width: 25%;
|
||||||
|
|
||||||
|
@media screen and (max-width: $small-break) {
|
||||||
|
background: $menu-background-color;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $menu-background-color-hover;
|
||||||
|
color: $menu-color-hover;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PLAYERS START */
|
||||||
|
|
||||||
|
.container {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acceptcontainer {
|
||||||
|
|
||||||
|
.accept {
|
||||||
|
grid-area: acceptcontainer;
|
||||||
|
visibility: hidden;
|
||||||
|
border: 2px solid $accept-border;
|
||||||
|
margin: 1.5vh auto;
|
||||||
|
max-width: 100%;
|
||||||
|
height: 5vh;
|
||||||
|
padding: 0.5vh 0vw;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: $accept-background-color;
|
||||||
|
cursor: pointer;
|
||||||
|
line-height: 5vh;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
justify-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
&.on {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus {
|
||||||
|
height: 5vh;
|
||||||
|
width: 5vh;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid $bonus-coin-border-color;
|
||||||
|
background: no-repeat $accept-bonus-coin-background-color center center / 60% 60%;
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
@for $i from 3 through 5 {
|
||||||
|
&.bonus#{$i} {
|
||||||
|
background-image: url(../bonus#{$i}.svg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.player {
|
||||||
|
border: 2px solid $player-border-color;
|
||||||
|
padding: 0.5vh 0;
|
||||||
|
margin: 1.5vh 1vw;
|
||||||
|
color: #444;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 2px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
height: 5vh;
|
||||||
|
line-height: 5vh;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&.selected {
|
||||||
|
background: $player-selected-background-color;
|
||||||
|
color: $player-selected-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score {
|
||||||
|
height: 50px;
|
||||||
|
width: 23px;
|
||||||
|
display: inline-block;
|
||||||
|
background-image: none;
|
||||||
|
background-size: auto auto;
|
||||||
|
margin: 0 5px;
|
||||||
|
background-image: url(../maharaja.svg);
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PLAYERS END */
|
||||||
|
|
||||||
|
* {
|
||||||
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SCORE TABLE START */
|
||||||
|
#scoreTable {
|
||||||
|
width: 90vw;
|
||||||
|
background: $score-table-background;
|
||||||
|
content: "";
|
||||||
|
height: 70vh;
|
||||||
|
position: absolute;
|
||||||
|
top: 15vh;
|
||||||
|
left: 5vw;
|
||||||
|
box-shadow: 0 0 207px #000000;
|
||||||
|
border: 3px solid $score-table-border-color;
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 10vh;
|
||||||
|
}
|
||||||
|
&.visible {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score_section {
|
||||||
|
display: none;
|
||||||
|
font-size: 35px;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section {
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
&.show {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.players_section, .camel_section {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
font-size: 45px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.camel_section .player1_camel, .camel_section .player2_camel {
|
||||||
|
background: url('../camel.svg') no-repeat 0 0 / 10vh 10vh;
|
||||||
|
height: 10vh;
|
||||||
|
width: 10vh;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.camel_section .nobody {
|
||||||
|
opacity: 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.camel_section .player1_camel.selected, .camel_section .player2_camel.selected, .camel_section .nobody.selected {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player1_bonus {
|
||||||
|
text-align: right;
|
||||||
|
margin-right: 3.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player1_bonus .bonus3, .player1_bonus .bonus4, .player1_bonus .bonus5 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bonus_section {
|
||||||
|
span:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
height: 6vh;
|
||||||
|
width: 6vh;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: -30px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid $bonus-coin-border-color;
|
||||||
|
background: no-repeat #fff center center / 60% 60%;
|
||||||
|
/*display: none;*/
|
||||||
|
}
|
||||||
|
.player1_bonus {
|
||||||
|
span:first-child {
|
||||||
|
margin-left: -30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.player2_bonus, .player1_bonus {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player2_bonus {
|
||||||
|
margin-left: 3.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
@for $i from 3 through 5 {
|
||||||
|
.bonus#{$i} span {
|
||||||
|
background-image: url(../bonus#{$i}.svg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MODAL */
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 75vw;
|
||||||
|
left: 12.5vw;
|
||||||
|
top: 25vh;
|
||||||
|
height: 50vh;
|
||||||
|
border: 1px solid $modal-border-color;
|
||||||
|
background: $modal-background-color;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
.close{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 2.5vh;
|
||||||
|
color: $modal-close-color;
|
||||||
|
&:hover {
|
||||||
|
color: $modal-close-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal_content {
|
||||||
|
padding: 3vw 3vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 4vh;
|
||||||
|
margin-bottom: 5vh;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
padding: 5px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&.on {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** PLAYER NAMES MODAL */
|
||||||
|
|
||||||
|
#playerNames {
|
||||||
|
|
||||||
|
}
|
||||||
48
sass/_reset.scss
Normal file
48
sass/_reset.scss
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/* http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
v2.0 | 20110126
|
||||||
|
License: none (public domain)
|
||||||
|
*/
|
||||||
|
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
font: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
25
sass/_variables.scss
Normal file
25
sass/_variables.scss
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
$coin-text-color: #000;
|
||||||
|
|
||||||
|
$accept-border: dodgerblue;
|
||||||
|
$accept-background-color: #bedfff;
|
||||||
|
|
||||||
|
$bonus-coin-border-color: dodgerblue;
|
||||||
|
$accept-bonus-coin-background-color: #fff;
|
||||||
|
|
||||||
|
$player-border-color: dodgerblue;
|
||||||
|
$player-selected-background-color: #6f9cc9;
|
||||||
|
$player-selected-color: #f2eeee;
|
||||||
|
|
||||||
|
$score-table-background: #fff;
|
||||||
|
$score-table-border-color: #ccc;
|
||||||
|
|
||||||
|
$modal-border-color: #eee;
|
||||||
|
$modal-background-color: #fff;
|
||||||
|
$modal-close-color: #ddd;
|
||||||
|
$modal-close-color-hover: #000;
|
||||||
|
|
||||||
|
$menu-color: #666;
|
||||||
|
$menu-color-hover: #333;
|
||||||
|
$menu-background-color-hover: #eee;
|
||||||
|
$menu-background-color: #ddd;
|
||||||
|
$small-break: 450px;
|
||||||
6
sass/index.scss
Normal file
6
sass/index.scss
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
@import 'reset';
|
||||||
|
@import 'variables';
|
||||||
|
@import 'grid';
|
||||||
|
@import 'light';
|
||||||
|
@import 'coins';
|
||||||
|
@import 'dark';
|
||||||
Reference in New Issue
Block a user