ajout du suivi des scores
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
data/scoreboard.csv
|
||||
518
Cercles.svg
518
Cercles.svg
@@ -7,8 +7,8 @@
|
||||
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="8000"
|
||||
height="5000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
viewBox="0 0 2116.6667 1322.9166"
|
||||
version="1.1"
|
||||
id="pastilles"
|
||||
@@ -17,7 +17,7 @@
|
||||
sodipodi:docname="Cercles.svg"><metadata
|
||||
id="metadata57"><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><sodipodi:namedview
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
@@ -27,13 +27,13 @@
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:zoom="0.125"
|
||||
inkscape:cx="3973.6242"
|
||||
inkscape:cy="2237.3561"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1080"
|
||||
inkscape:zoom="0.69615707"
|
||||
inkscape:cx="834.25801"
|
||||
inkscape:cy="525.58"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1405"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-y="35"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
@@ -49,403 +49,403 @@
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-772.76941,412.44154)"><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:3.27929;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:3.62204;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="1"
|
||||
cx="901.22113"
|
||||
cy="788.289"
|
||||
rx="96.933357"
|
||||
ry="96.592751" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
cx="790.96533"
|
||||
cy="733.57477"
|
||||
rx="107.06476"
|
||||
ry="106.68855" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="5"
|
||||
cx="1029.8986"
|
||||
cy="571.52905"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="933.09198"
|
||||
cy="494.15921"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="6"
|
||||
cx="1016.0817"
|
||||
cy="413.93869"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="917.83105"
|
||||
cy="320.09763"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-cx="1000.9954"
|
||||
inkscape:tile-cy="238.11653"
|
||||
inkscape:tile-w="78.971536"
|
||||
inkscape:tile-h="78.125565"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="7"
|
||||
cx="976.59595"
|
||||
cy="256.34833"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="874.21826"
|
||||
cy="146.03699"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="15"
|
||||
cx="1366.5487"
|
||||
cy="548.24921"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1304.9287"
|
||||
cy="468.44617"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="4"
|
||||
cx="1223.0504"
|
||||
cy="676.04724"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1146.432"
|
||||
cy="609.60156"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="22"
|
||||
cx="1584.5557"
|
||||
cy="-18.510092"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1545.7216"
|
||||
cy="-157.5499"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="23"
|
||||
cx="1708.7368"
|
||||
cy="18.22175"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1682.8821"
|
||||
cy="-116.97883"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="28"
|
||||
cx="1750.1306"
|
||||
cy="777.96405"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1728.6023"
|
||||
cy="722.17065"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="33"
|
||||
cx="1979.1759"
|
||||
cy="271.05823"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1981.5873"
|
||||
cy="162.28389"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="38"
|
||||
cx="2158.5488"
|
||||
cy="313.30923"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2179.708"
|
||||
cy="208.95045"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="42"
|
||||
cx="2285.4895"
|
||||
cy="810.8913"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2319.9165"
|
||||
cy="758.53943"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="47"
|
||||
cx="2368.2771"
|
||||
cy="85.978477"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2411.3569"
|
||||
cy="-42.140263"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="14"
|
||||
cx="1417.9244"
|
||||
cy="451.66385"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1361.6742"
|
||||
cy="361.76578"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="2"
|
||||
cx="1144.7258"
|
||||
cy="822.30511"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1059.921"
|
||||
cy="771.14618"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="21"
|
||||
cx="1547.6248"
|
||||
cy="182.93939"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1504.9307"
|
||||
cy="64.955406"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="24"
|
||||
cx="1729.7572"
|
||||
cy="136.88377"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1706.0995"
|
||||
cy="14.085772"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="29"
|
||||
cx="1876.015"
|
||||
cy="833.1557"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1867.644"
|
||||
cy="783.13086"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="34"
|
||||
cx="1892.5725"
|
||||
cy="124.80038"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1885.9321"
|
||||
cy="0.73930776"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="43"
|
||||
cx="2361.7014"
|
||||
cy="697.74841"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2404.094"
|
||||
cy="633.57092"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="48"
|
||||
cx="2516.238"
|
||||
cy="16.988932"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2574.7827"
|
||||
cy="-118.34049"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="8"
|
||||
cx="1095.0533"
|
||||
cy="161.05051"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1005.0568"
|
||||
cy="40.778713"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="13"
|
||||
cx="1317.5231"
|
||||
cy="344.04016"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1250.7789"
|
||||
cy="242.89336"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="3"
|
||||
cx="1325.8019"
|
||||
cy="808.5072"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1259.9231"
|
||||
cy="755.90613"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="20"
|
||||
cx="1546.5684"
|
||||
cy="315.39932"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1503.7639"
|
||||
cy="211.25899"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="25"
|
||||
cx="1745.2583"
|
||||
cy="316.25659"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1723.2207"
|
||||
cy="212.20587"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="30"
|
||||
cx="1977.0632"
|
||||
cy="731.05115"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1979.2538"
|
||||
cy="670.35443"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="35"
|
||||
cx="1974.3036"
|
||||
cy="-38.014942"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1976.2057"
|
||||
cy="-179.09337"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="39"
|
||||
cx="2175.7532"
|
||||
cy="459.56708"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2198.7107"
|
||||
cy="370.49506"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="44"
|
||||
cx="2338.5686"
|
||||
cy="559.76935"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2378.5435"
|
||||
cy="481.17038"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="49"
|
||||
cx="2575.8926"
|
||||
cy="210.15967"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2640.6724"
|
||||
cy="95.020721"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="9"
|
||||
cx="1167.0072"
|
||||
cy="-4.524406"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1084.5312"
|
||||
cy="-142.10242"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="12"
|
||||
cx="1363.3796"
|
||||
cy="225.37816"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1301.4283"
|
||||
cy="111.82983"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="16"
|
||||
cx="1446.1671"
|
||||
cy="722.96014"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1392.8688"
|
||||
cy="661.41779"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="19"
|
||||
cx="1592.4249"
|
||||
cy="442.34009"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1554.4133"
|
||||
cy="351.4675"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="26"
|
||||
cx="1771.7977"
|
||||
cy="448.71652"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1752.5341"
|
||||
cy="358.51041"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="31"
|
||||
cx="1959.4493"
|
||||
cy="573.755"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1959.7988"
|
||||
cy="496.61783"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="36"
|
||||
cx="2113.9861"
|
||||
cy="8.8979578"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2130.4875"
|
||||
cy="-127.27714"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="40"
|
||||
cx="2127.7839"
|
||||
cy="600.30579"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2145.7275"
|
||||
cy="525.94366"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="45"
|
||||
cx="2323.7144"
|
||||
cy="374.87735"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2362.1365"
|
||||
cy="276.95361"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="10"
|
||||
cx="1285.4645"
|
||||
cy="-4.524406"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1215.3696"
|
||||
cy="-142.10242"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="11"
|
||||
cx="1373.3617"
|
||||
cy="98.437386"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1312.4537"
|
||||
cy="-28.379158"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="17"
|
||||
cx="1577.5707"
|
||||
cy="811.26678"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1538.0065"
|
||||
cy="758.95416"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="18"
|
||||
cx="1624.4836"
|
||||
cy="629.99164"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1589.8228"
|
||||
cy="558.73224"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="27"
|
||||
cx="1756.9435"
|
||||
cy="567.37854"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1736.1272"
|
||||
cy="489.57489"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="32"
|
||||
cx="1922.5184"
|
||||
cy="430.25674"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="1919.0079"
|
||||
cy="338.12122"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="37"
|
||||
cx="2121.2085"
|
||||
cy="168.9537"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2138.4648"
|
||||
cy="49.507946"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="41"
|
||||
cx="2165.3618"
|
||||
cy="763.12109"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2187.2332"
|
||||
cy="705.77631"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.30881;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:1;fill:#f2f2f2;stroke:#ff0000;stroke-width:1.44561;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="46"
|
||||
cx="2325.4175"
|
||||
cy="220.34077"
|
||||
rx="38.831364"
|
||||
ry="38.408379"
|
||||
cx="2364.0178"
|
||||
cy="106.26595"
|
||||
rx="42.889988"
|
||||
ry="42.422794"
|
||||
inkscape:tile-x0="961.50963"
|
||||
inkscape:tile-y0="199.05374" /><ellipse
|
||||
style="opacity:0.816129;fill:#f2f2f2;stroke:#ff0000;stroke-width:3.27929;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
style="opacity:0.816129;fill:#f2f2f2;stroke:#ff0000;stroke-width:3.62204;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="50"
|
||||
cx="2727.3398"
|
||||
cy="391.19397"
|
||||
rx="96.933357"
|
||||
ry="96.592751" /></g></svg>
|
||||
cx="2807.9487"
|
||||
cy="294.97565"
|
||||
rx="107.06476"
|
||||
ry="106.68855" /></g></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@@ -1,51 +0,0 @@
|
||||
id,posx,posy,rx
|
||||
0,871.34241,452.9252,97
|
||||
1,1114.847,486.94131,39
|
||||
2,1295.9231,473.1434,39
|
||||
3,1193.1716,340.68347,39
|
||||
4,1000.0198,236.16524,39
|
||||
5,979.21808,77.237282,39
|
||||
6,946.71722,-79.015465,39
|
||||
7,1065.1746,-174.31331,39
|
||||
8,1137.1284,-339.88821,39
|
||||
9,1255.5857,-339.88821,39
|
||||
10,1343.4829,-236.92642,39
|
||||
11,1333.5009,-109.98565,39
|
||||
12,1287.6443,8.6763725,39
|
||||
13,1388.0457,116.30006,39
|
||||
14,1336.6699,212.88544,39
|
||||
15,1416.2883,387.59634,39
|
||||
16,1547.6919,475.90298,39
|
||||
17,1594.6049,294.62784,39
|
||||
18,1562.5461,106.97628,39
|
||||
19,1516.6896,-19.964481,39
|
||||
20,1517.746,-152.42442,39
|
||||
21,1554.6769,-353.8739,39
|
||||
22,1678.858,-317.14206,39
|
||||
23,1699.8784,-198.48003,39
|
||||
24,1715.3795,-19.107201,39
|
||||
25,1741.9189,113.35272,39
|
||||
26,1727.0648,232.01474,39
|
||||
27,1720.2517,442.60028,39
|
||||
28,1846.1361,497.7919,39
|
||||
29,1947.1843,395.68738,39
|
||||
30,1929.5706,238.3912,39
|
||||
31,1892.6396,94.89296,39
|
||||
32,1949.2971,-64.305588,39
|
||||
33,1862.6936,-210.56342,39
|
||||
34,1944.4248,-373.37875,39
|
||||
35,2084.1072,-326.46585,39
|
||||
36,2091.3296,-166.41011,39
|
||||
37,2128.6699,-22.054552,39
|
||||
38,2145.8743,124.20329,39
|
||||
39,2097.905,264.94199,39
|
||||
40,2135.4829,427.75729,39
|
||||
41,2255.6106,475.5275,39
|
||||
42,2331.8225,362.38464,39
|
||||
43,2308.6897,224.40555,39
|
||||
44,2293.8354,39.513561,39
|
||||
45,2295.5386,-115.02303,39
|
||||
46,2338.3982,-249.38533,39
|
||||
47,2486.3591,-318.37488,39
|
||||
48,2546.0137,-125.20415,39
|
||||
49,2697.4609,55.830173,97
|
||||
|
53
Equipe.pde
Normal file
53
Equipe.pde
Normal file
@@ -0,0 +1,53 @@
|
||||
class Equipe {
|
||||
int id, score, radius;
|
||||
float pos_x, pos_y;
|
||||
String membres;
|
||||
color couleur;
|
||||
Pion pion;
|
||||
|
||||
Equipe(int id) {
|
||||
this.id = id;
|
||||
this.score = 0;
|
||||
//float randomHue = random(255);
|
||||
//float randomSaturation = random(100,255);
|
||||
//float randomBrightness = random(80,255);
|
||||
//color inverseText = color(float(255)-randomHue, float(255)-randomSaturation, float(255)-randomBrightness);
|
||||
//this.couleur = color(randomHue, randomSaturation, randomBrightness);
|
||||
//this.pion = new Pion(this.id, this.couleur, inverseText);
|
||||
|
||||
// générer un pion pour l'équipe
|
||||
this.pion = new Pion(this.id);
|
||||
|
||||
// récupérer les valeurs de positionnement initial du pion
|
||||
this.pos_x = this.pion.posX;
|
||||
this.pos_y = this.pion.posY;
|
||||
this.radius = this.pion.radius;
|
||||
|
||||
// afficher l'emplacement de l'équipe avant le pion
|
||||
this.update();
|
||||
}
|
||||
|
||||
void update() {
|
||||
// affichage de l'emplacement d'équipe, qui restera toujours fixe
|
||||
color bgColor = color(235, 112, 71, 0.8);
|
||||
color textColor = color(200);
|
||||
fill(bgColor);
|
||||
stroke(bgColor);
|
||||
strokeWeight(0.5);
|
||||
circle(this.pos_x,this.pos_y,radius);
|
||||
|
||||
fill(textColor);
|
||||
float textSize = this.radius/4*3;
|
||||
textSize(textSize);
|
||||
float pos_x = this.id<9? this.pos_x-radius/5: this.pos_x-radius/3;
|
||||
text(this.id+1, pos_x, this.pos_y+radius/5);
|
||||
|
||||
// mise à jour du pion
|
||||
this.pion.draw();
|
||||
}
|
||||
|
||||
void setScore(int score) {
|
||||
this.score = score;
|
||||
println("Equipe", this.id+1, "setScore", score);
|
||||
}
|
||||
}
|
||||
63
Pion.pde
Normal file
63
Pion.pde
Normal file
@@ -0,0 +1,63 @@
|
||||
class Pion {
|
||||
int id;
|
||||
float posX, posY; // position
|
||||
color bgColor, textColor; // couleur du fond et du texte
|
||||
boolean hovered, dragged = false; // état au survol et en déplacement
|
||||
int radius = 30; // rayon du pion
|
||||
int margin = 45; // marge au bord de l'écran
|
||||
PVector offset;
|
||||
|
||||
Pion(int id) {
|
||||
this.id = id;
|
||||
this.bgColor = color(235, 112, 71, 0.8);
|
||||
this.textColor = color(200);
|
||||
this.posX = floor((displayWidth-margin*2)/nombreEquipes)*id+radius+margin;
|
||||
this.posY = displayHeight-24;
|
||||
}
|
||||
|
||||
void draw() {
|
||||
color bgColor = this.getBgColor();
|
||||
color textColor = this.getTextColor();
|
||||
|
||||
stroke(bgColor);
|
||||
strokeWeight(0.5);
|
||||
fill(bgColor);
|
||||
float radius = this.radius;
|
||||
circle(this.posX,this.posY,radius);
|
||||
|
||||
fill(textColor);
|
||||
float textSize = radius/3*2;
|
||||
textSize(textSize);
|
||||
textFont(quicksandFont, textSize);
|
||||
|
||||
float pos_x = this.id<9? this.posX-radius/5: this.posX-radius/3;
|
||||
text(this.id+1, pos_x, this.posY+radius/5+1);
|
||||
}
|
||||
|
||||
color getBgColor() {
|
||||
return this.dragged? color(177, 255, 51): this.hovered? this.textColor: this.bgColor;
|
||||
}
|
||||
|
||||
color getTextColor() {
|
||||
return this.dragged? color(0): this.hovered? this.bgColor: this.textColor;
|
||||
}
|
||||
|
||||
void dragStart() {
|
||||
this.dragged = true;
|
||||
// calcul et stockage du décalage au curseur pour éviter l'effet snap
|
||||
this.offset = new PVector(posX-mouseX, posY-mouseY);
|
||||
}
|
||||
|
||||
void dragStop() {
|
||||
this.dragged = false;
|
||||
this.offset = new PVector(0,0);
|
||||
}
|
||||
|
||||
void hoverStart() {
|
||||
this.hovered = true;
|
||||
}
|
||||
|
||||
void hoverStop() {
|
||||
this.hovered = false;
|
||||
}
|
||||
}
|
||||
247
Plateau.pde
Normal file
247
Plateau.pde
Normal file
@@ -0,0 +1,247 @@
|
||||
PImage backgroundImage;
|
||||
Equipe[] equipes;
|
||||
Position[] positions;
|
||||
int nombreEquipes = 42;
|
||||
PFont quicksandFont;
|
||||
boolean EDITING;
|
||||
|
||||
Table table_Cercles, positionTable, scoreboard;
|
||||
float[] coord_x;
|
||||
float[] coord_y;
|
||||
int[] coord_rayon;
|
||||
|
||||
void setup() {
|
||||
|
||||
size(displayWidth, displayHeight);
|
||||
fullScreen(1);
|
||||
//randomSeed(3);
|
||||
//frameRate(60);
|
||||
colorMode(RGB, 255);
|
||||
rectMode(CENTER);
|
||||
noStroke();
|
||||
EDITING=false;
|
||||
|
||||
table_Cercles = loadTable("data/positionTable.csv", "header");
|
||||
quicksandFont = loadFont("Quicksand-Bold-40.vlw");
|
||||
|
||||
backgroundImage = loadImage("backgroundImage.jpg");
|
||||
image(backgroundImage, 0, 0, displayWidth, displayHeight);
|
||||
|
||||
equipes = new Equipe[nombreEquipes];
|
||||
for (int i=0; i<equipes.length; i++) {
|
||||
equipes[i] = new Equipe(i);
|
||||
}
|
||||
|
||||
positions = new Position[table_Cercles.getRowCount()];
|
||||
for (int i=0; i<table_Cercles.getRowCount(); i++) {
|
||||
positions[i] = new Position(table_Cercles.getInt(i, "id"));
|
||||
positions[i].radius = (i==0 || i==table_Cercles.getRowCount()-1)? 145: 60;
|
||||
positions[i].posX = table_Cercles.getFloat(i, "posx");
|
||||
positions[i].posY = table_Cercles.getFloat(i, "posy");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void mouseMoved() {
|
||||
// pour chaque équipe
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Equipe e = equipes[i];
|
||||
Pion p = e.pion;
|
||||
|
||||
// calcul de distance entre la souris et le pion
|
||||
float distPion = dist(p.posX, p.posY, mouseX, mouseY);
|
||||
// calcul de distance entre la souris et l'emplacement d'équipe
|
||||
float distEquipe = dist(e.pos_x, e.pos_y, mouseX, mouseY);
|
||||
// seuil de collision
|
||||
float threshold = p.radius/2;
|
||||
|
||||
// si la souris est au delà du seuil de collision et que le pion est dans un état actif
|
||||
if (distPion>threshold && distEquipe>threshold && (p.hovered || p.dragged)) {
|
||||
// cloture des deux états
|
||||
p.dragStop();
|
||||
p.hoverStop();
|
||||
break;
|
||||
|
||||
// si la souris est sous le seuil de collision du pion et qu'il n'est pas déjà dans l'état survolé
|
||||
} else if ((distPion<=threshold || distEquipe<=threshold) && !p.hovered) {
|
||||
// activation de l'état survolé
|
||||
p.hoverStart();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (EDITING) {
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
Position p = positions[i];
|
||||
float distPosition = dist(p.posX, p.posY, mouseX, mouseY);
|
||||
float threshold = p.radius/2;
|
||||
|
||||
if (distPosition>threshold && (p.hovered || p.dragged)) {
|
||||
p.dragStop();
|
||||
p.hoverStop();
|
||||
break;
|
||||
} else if (distPosition<=threshold && !p.hovered) {
|
||||
p.hoverStart();
|
||||
//println(p.posX, p.posY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mousePressed() {
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Pion p = equipes[i].pion;
|
||||
float d = dist(p.posX, p.posY, mouseX, mouseY);
|
||||
if (d<p.radius/2) {
|
||||
//println(p.id+1);
|
||||
p.dragStart();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (EDITING) {
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
Position p = positions[i];
|
||||
float d = dist(p.posX, p.posY, mouseX, mouseY);
|
||||
if (d<p.radius/2) {
|
||||
//println(p.id+1);
|
||||
p.dragStart();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mouseDragged() {
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Pion p = equipes[i].pion;
|
||||
if (p.dragged) {
|
||||
p.posX = mouseX+p.offset.x;
|
||||
p.posY = mouseY+p.offset.y;
|
||||
// cloture de la boucle for, pour ne pas cibler plusieurs pions si c'était possible
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (EDITING) {
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
Position p = positions[i];
|
||||
if (p.dragged) {
|
||||
p.posX = mouseX+p.offset.x;
|
||||
p.posY = mouseY+p.offset.y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mouseReleased() {
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Pion p = equipes[i].pion;
|
||||
if (p.dragged) {
|
||||
p.dragStop();
|
||||
equipes[i].setScore(findClosestPositionFrom(p).getScore());
|
||||
saveScoreboard();
|
||||
}
|
||||
}
|
||||
|
||||
if (EDITING) {
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
Position p = positions[i];
|
||||
if (p.dragged) {
|
||||
p.dragStop();
|
||||
savePositionTable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mouseWheel(MouseEvent event) {
|
||||
// pour chaque équipe
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Equipe e = equipes[i];
|
||||
Pion p = e.pion;
|
||||
|
||||
// calcul de distance entre la souris et l'emplacement d'équipe
|
||||
float distEquipe = dist(e.pos_x, e.pos_y, mouseX, mouseY);
|
||||
// seuil de collision
|
||||
float threshold = p.radius/2;
|
||||
// nouveau rayon
|
||||
int radius = p.radius + event.getCount()*-5;
|
||||
|
||||
// si la souris est sous le seuil de collision
|
||||
if (distEquipe<=threshold && radius>20 && radius<120) {
|
||||
p.radius = radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void savePositionTable() {
|
||||
positionTable = new Table();
|
||||
|
||||
positionTable.addColumn("id");
|
||||
positionTable.addColumn("posx");
|
||||
positionTable.addColumn("posy");
|
||||
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
Position p = positions[i];
|
||||
TableRow position = positionTable.addRow();
|
||||
|
||||
position.setInt("id", p.id);
|
||||
position.setFloat("posx", p.posX);
|
||||
position.setFloat("posy", p.posY);
|
||||
}
|
||||
|
||||
saveTable(positionTable, "data/positionTable.csv", "csv");
|
||||
|
||||
}
|
||||
|
||||
void saveScoreboard() {
|
||||
scoreboard = new Table();
|
||||
|
||||
scoreboard.addColumn("equipe");
|
||||
scoreboard.addColumn("score");
|
||||
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Equipe e = equipes[i];
|
||||
TableRow scoreEquipe = scoreboard.addRow();
|
||||
|
||||
scoreEquipe.setInt("equipe", e.id+1);
|
||||
scoreEquipe.setInt("score", e.score);
|
||||
}
|
||||
|
||||
saveTable(scoreboard, "data/scoreboard.csv", "csv");
|
||||
}
|
||||
|
||||
Position findClosestPositionFrom(Pion pion) {
|
||||
|
||||
Position closest = positions[0];
|
||||
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
Position position = positions[i];
|
||||
|
||||
float distPion = dist(pion.posX, pion.posY, position.posX, position.posY);
|
||||
float distClosest = dist(pion.posX, pion.posY, closest.posX, closest.posY);
|
||||
|
||||
if (distPion<=distClosest) closest = positions[i];
|
||||
}
|
||||
|
||||
return closest;
|
||||
}
|
||||
|
||||
void draw() {
|
||||
image(backgroundImage, 0, 0, displayWidth, displayHeight);
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
equipes[i].update();
|
||||
}
|
||||
|
||||
if (EDITING) {
|
||||
for (int i = 0 ; i < positions.length; i++) {
|
||||
positions[i].draw();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
192
Plateau_pde.pde
192
Plateau_pde.pde
@@ -1,192 +0,0 @@
|
||||
PImage backgroundImage;
|
||||
Equipe[] equipes;
|
||||
int nombreEquipes = 50;
|
||||
|
||||
void setup() {
|
||||
|
||||
size(displayWidth, displayHeight);
|
||||
fullScreen(1);
|
||||
randomSeed(3);
|
||||
frameRate(30);
|
||||
colorMode(HSB, 255);
|
||||
rectMode(CENTER);
|
||||
noStroke();
|
||||
|
||||
backgroundImage = loadImage("backgroundImage.jpg");
|
||||
image(backgroundImage, 0, 0, displayWidth, displayHeight);
|
||||
|
||||
equipes = new Equipe[nombreEquipes];
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
equipes[i] = new Equipe(i);
|
||||
}
|
||||
}
|
||||
|
||||
class Equipe {
|
||||
int id, score, pos_x, pos_y, radius;
|
||||
String membres;
|
||||
color couleur;
|
||||
Pion pion;
|
||||
|
||||
Equipe(int id) {
|
||||
this.id = id;
|
||||
this.score = 0;
|
||||
//float randomHue = random(255);
|
||||
//float randomSaturation = random(100,255);
|
||||
//float randomBrightness = random(80,255);
|
||||
//color inverseText = color(float(255)-randomHue, float(255)-randomSaturation, float(255)-randomBrightness);
|
||||
//this.couleur = color(randomHue, randomSaturation, randomBrightness);
|
||||
//this.pion = new Pion(this.id, this.couleur, inverseText);
|
||||
|
||||
// générer un pion pour l'équipe
|
||||
this.pion = new Pion(this.id, color(0), color(255));
|
||||
|
||||
// récupérer les valeurs de positionnement initial du pion
|
||||
this.pos_x = this.pion.pos_x;
|
||||
this.pos_y = this.pion.pos_y;
|
||||
this.radius = this.pion.radius;
|
||||
|
||||
// afficher l'emplacement de l'équipe avant le pion
|
||||
this.update();
|
||||
}
|
||||
|
||||
void update() {
|
||||
color bgColor = color(100, 100, 200);
|
||||
color textColor = color(200, 100, 200);
|
||||
fill(bgColor);
|
||||
float radius = this.radius;
|
||||
circle(this.pos_x,this.pos_y,radius);
|
||||
fill(textColor);
|
||||
float textSize = this.radius/4*3;
|
||||
textSize(textSize);
|
||||
float pos_x = this.id<9? this.pos_x-radius/5: this.pos_x-radius/3;
|
||||
text(this.id+1, pos_x, this.pos_y+radius/5);
|
||||
|
||||
this.pion.update();
|
||||
}
|
||||
}
|
||||
|
||||
class Pion {
|
||||
int id, pos_x, pos_y, radius;
|
||||
color fond, texte;
|
||||
boolean hovered, dragged;
|
||||
|
||||
Pion(int id, color fond, color texte) {
|
||||
this.id = id;
|
||||
this.fond = fond;
|
||||
this.texte = texte;
|
||||
this.radius = 30;
|
||||
this.pos_x = floor(displayWidth/nombreEquipes)*id+radius;
|
||||
this.pos_y = 30;
|
||||
this.hovered = false;
|
||||
this.dragged = false;
|
||||
}
|
||||
|
||||
void update() {
|
||||
color bgColor = this.dragged? color(40, 250, 250): this.hovered? this.texte: this.fond;
|
||||
color textColor = this.dragged? color(210, 10, 10): this.hovered? this.fond: this.texte;
|
||||
|
||||
stroke(bgColor);
|
||||
strokeWeight(0.5);
|
||||
fill(bgColor);
|
||||
float radius = this.radius; //this.dragged? this.radius*1.4: this.hovered? this.radius*1.2: this.radius;
|
||||
circle(this.pos_x,this.pos_y,radius);
|
||||
|
||||
fill(textColor);
|
||||
float textSize = this.radius/4*3; //this.dragged? this.radius*0.75: this.hovered? this.radius*0.75: this.radius*0.75;
|
||||
textSize(textSize);
|
||||
|
||||
float pos_x = this.id<9? this.pos_x-radius/5: this.pos_x-radius/3;
|
||||
text(this.id+1, pos_x, this.pos_y+radius/5);
|
||||
}
|
||||
|
||||
void dragStart() {
|
||||
this.dragged = true;
|
||||
}
|
||||
|
||||
void dragStop() {
|
||||
this.dragged = false;
|
||||
}
|
||||
|
||||
void hoverStart() {
|
||||
this.hovered = true;
|
||||
}
|
||||
|
||||
void hoverStop() {
|
||||
this.hovered = false;
|
||||
}
|
||||
}
|
||||
|
||||
void mouseDragged() {
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Pion p = equipes[i].pion;
|
||||
if (p.dragged) {
|
||||
p.pos_x = mouseX;
|
||||
p.pos_y = mouseY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mouseMoved() {
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Equipe e = equipes[i];
|
||||
Pion p = e.pion;
|
||||
|
||||
float distPion = dist(p.pos_x, p.pos_y, mouseX, mouseY);
|
||||
float distEquipe = dist(e.pos_x, e.pos_y, mouseX, mouseY);
|
||||
float threshold = p.radius/2;
|
||||
|
||||
if (distPion>threshold && distEquipe>threshold && (p.hovered || p.dragged)) {
|
||||
p.dragStop();
|
||||
p.hoverStop();
|
||||
} else if (distPion<=threshold && !p.hovered) {
|
||||
println(p.id+1);
|
||||
p.hoverStart();
|
||||
} else if (distEquipe<=threshold && !p.dragged) {
|
||||
println(p.id+1);
|
||||
p.dragStart();
|
||||
}
|
||||
|
||||
//if (distPion<p.radius/2 && !p.hovered) {
|
||||
// println(p.id+1);
|
||||
// p.hoverStart();
|
||||
//} else if(distPion>=p.radius/2 && p.hovered) {
|
||||
// p.hoverStop();
|
||||
//} else if(distEquipe<e.radius/2 && !p.hovered) {
|
||||
// println(p.id+1);
|
||||
// p.dragStart();
|
||||
//} else if(distEquipe>=e.radius/2 && p.hovered) {
|
||||
// p.dragStop();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
void mousePressed() {
|
||||
//println(mouseX, mouseY);
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Pion p = equipes[i].pion;
|
||||
float d = dist(p.pos_x, p.pos_y, mouseX, mouseY);
|
||||
if (d<p.radius/2) {
|
||||
println(p.id+1);
|
||||
p.dragStart();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mouseReleased() {
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
Pion p = equipes[i].pion;
|
||||
if (p.dragged) {
|
||||
p.dragStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
image(backgroundImage, 0, 0, displayWidth, displayHeight);
|
||||
for (int i = 0 ; i < equipes.length; i++) {
|
||||
equipes[i].update();
|
||||
}
|
||||
}
|
||||
72
Position.pde
Normal file
72
Position.pde
Normal file
@@ -0,0 +1,72 @@
|
||||
class Position {
|
||||
int id;
|
||||
float posX, posY; // position
|
||||
color bgColor, textColor; // couleur du fond et du texte
|
||||
boolean hovered, dragged = false; // état au survol et en déplacement
|
||||
int radius = 60; // rayon du pion
|
||||
PVector offset;
|
||||
|
||||
Position(int id) {
|
||||
this.id = id;
|
||||
this.bgColor = color(255);
|
||||
this.textColor = color(0);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
color bgColor = this.getBgColor();
|
||||
color textColor = this.getTextColor();
|
||||
|
||||
stroke(bgColor);
|
||||
strokeWeight(0.5);
|
||||
fill(bgColor);
|
||||
float radius = this.radius;
|
||||
circle(this.posX,this.posY,radius);
|
||||
|
||||
fill(textColor);
|
||||
float textSize = radius/3*2;
|
||||
textSize(textSize);
|
||||
textFont(quicksandFont, textSize);
|
||||
|
||||
float pos_x = this.id<9? this.posX-radius/5: this.posX-radius/3;
|
||||
text(this.id+1, pos_x, this.posY+radius/5+1);
|
||||
}
|
||||
|
||||
color getBgColor() {
|
||||
return this.dragged? color(177, 255, 51): this.hovered? this.textColor: this.bgColor;
|
||||
}
|
||||
|
||||
color getTextColor() {
|
||||
return this.dragged? color(0): this.hovered? this.bgColor: this.textColor;
|
||||
}
|
||||
|
||||
int getScore() {
|
||||
return this.id+1;
|
||||
}
|
||||
|
||||
void setBgColor(color bgColor) {
|
||||
this.bgColor = bgColor;
|
||||
}
|
||||
|
||||
void setTextColor(color textColor) {
|
||||
this.textColor = textColor;
|
||||
}
|
||||
|
||||
void dragStart() {
|
||||
this.dragged = true;
|
||||
// calcul et stockage du décalage au curseur pour éviter l'effet snap
|
||||
this.offset = new PVector(posX-mouseX, posY-mouseY);
|
||||
}
|
||||
|
||||
void dragStop() {
|
||||
this.dragged = false;
|
||||
this.offset = new PVector(0,0);
|
||||
}
|
||||
|
||||
void hoverStart() {
|
||||
this.hovered = true;
|
||||
}
|
||||
|
||||
void hoverStop() {
|
||||
this.hovered = false;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 25 MiB After Width: | Height: | Size: 552 KiB |
BIN
data/Quicksand-Bold-40.vlw
Normal file
BIN
data/Quicksand-Bold-40.vlw
Normal file
Binary file not shown.
51
data/positionTable.csv
Normal file
51
data/positionTable.csv
Normal file
@@ -0,0 +1,51 @@
|
||||
id,posx,posy
|
||||
0,126.0,938.8504
|
||||
1,339.50464,963.8665
|
||||
2,501.5807,952.0686
|
||||
3,404.82922,851.60864
|
||||
4,232.67737,773.09045
|
||||
5,218.87567,649.1625
|
||||
6,184.37482,523.9097
|
||||
7,291.83215,451.61188
|
||||
8,350.786,325.037
|
||||
9,464.2433,328.037
|
||||
10,547.1405,401.99878
|
||||
11,531.15845,506.93954
|
||||
12,492.30188,593.60156
|
||||
13,580.70325,680.2253
|
||||
14,530.3275,751.81067
|
||||
15,611.9459,886.52155
|
||||
16,731.3495,957.8282
|
||||
17,774.26245,815.55304
|
||||
18,743.20374,672.9015
|
||||
19,702.34717,574.9607
|
||||
20,700.40356,472.5008
|
||||
21,732.3345,312.0513
|
||||
22,849.5156,341.78314
|
||||
23,868.536,439.4452
|
||||
24,880.0371,576.818
|
||||
25,903.57654,673.27795
|
||||
26,889.7224,771.93994
|
||||
27,886.9093,931.5255
|
||||
28,996.7937,972.7171
|
||||
29,1090.8419,893.61255
|
||||
30,1075.2281,775.3164
|
||||
31,1044.2972,662.8182
|
||||
32,1088.9547,543.6196
|
||||
33,1018.3512,425.3618
|
||||
34,1088.0824,293.54645
|
||||
35,1216.7648,339.45935
|
||||
36,1223.9872,455.51508
|
||||
37,1253.3275,570.8706
|
||||
38,1266.5319,688.1285
|
||||
39,1227.5626,795.8672
|
||||
40,1262.1405,921.6825
|
||||
41,1370.2682,957.4527
|
||||
42,1440.4801,873.3098
|
||||
43,1419.3473,762.33075
|
||||
44,1403.493,620.4387
|
||||
45,1409.1962,504.90216
|
||||
46,1439.0558,394.53986
|
||||
47,1577.0167,345.55032
|
||||
48,1630.6713,492.72107
|
||||
49,1774.1185,632.7554
|
||||
|
1
sketch.properties
Normal file
1
sketch.properties
Normal file
@@ -0,0 +1 @@
|
||||
main=Plateau.pde
|
||||
Reference in New Issue
Block a user