| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!-- |
| 3 |
|
| 4 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 |
contributor license agreements. See the NOTICE file distributed with |
| 6 |
this work for additional information regarding copyright ownership. |
| 7 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 |
(the "License"); you may not use this file except in compliance with |
| 9 |
the License. You may obtain a copy of the License at |
| 10 |
|
| 11 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 12 |
|
| 13 |
Unless required by applicable law or agreed to in writing, software |
| 14 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 15 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 |
See the License for the specific language governing permissions and |
| 17 |
limitations under the License. |
| 18 |
|
| 19 |
--> |
| 20 |
|
| 21 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| 22 |
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 23 |
<svg width="800" height="600" viewBox="0 0 800 600" |
| 24 |
onload="loadHandler(evt)" |
| 25 |
xmlns="http://www.w3.org/2000/svg" |
| 26 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 27 |
|
| 28 |
<script type="text/ecmascript" xlink:href="script/util.js"/> |
| 29 |
<script type="text/ecmascript" xlink:href="script/board.js"/> |
| 30 |
<script type="text/ecmascript" xlink:href="script/deck.js"/> |
| 31 |
<script type="text/ecmascript" xlink:href="script/card.js"/> |
| 32 |
<script type="text/ecmascript" xlink:href="script/pile.js"/> |
| 33 |
<script type="text/ecmascript"><![CDATA[ |
| 34 |
var svgns = "http://www.w3.org/2000/svg"; |
| 35 |
var xlinkns = "http://www.w3.org/1999/xlink"; |
| 36 |
var cg = document.getElementById("cards"); |
| 37 |
var moveGroup = document.getElementById("move"); |
| 38 |
var dragGroup = document.getElementById("drag"); |
| 39 |
var root = document.getRootElement(); |
| 40 |
var allowDrag = true; |
| 41 |
|
| 42 |
var BOARD = new Board(cg, moveGroup); |
| 43 |
BOARD.setNotifyMoveDone(towersMoveDone); |
| 44 |
|
| 45 |
var DECK_PILES = new Array(); |
| 46 |
DECK_PILES[0] = new Pile(BOARD, 2.5, 5, 75, 105, 0, 0, 0, 0); |
| 47 |
DECK_PILES[1] = new Pile(BOARD, 82.5, 5, 75, 105, 0, 0, 0, 0); |
| 48 |
DECK_PILES[2] = new Pile(BOARD, 642.5, 5, 75, 105, 0, 0, 0, 0); |
| 49 |
DECK_PILES[3] = new Pile(BOARD, 722.5, 5, 75, 105, 0, 0, 0, 0); |
| 50 |
|
| 51 |
var HOLD_PILES = new Array(); |
| 52 |
HOLD_PILES[0] = new Pile(BOARD, 242.5, 5, 75, 105, 0, 0, 0, 0); |
| 53 |
HOLD_PILES[1] = new Pile(BOARD, 322.5, 5, 75, 105, 0, 0, 0, 0); |
| 54 |
HOLD_PILES[2] = new Pile(BOARD, 402.5, 5, 75, 105, 0, 0, 0, 0); |
| 55 |
HOLD_PILES[3] = new Pile(BOARD, 482.5, 5, 75, 105, 0, 0, 0, 0); |
| 56 |
|
| 57 |
var piles; |
| 58 |
|
| 59 |
function loadHandler(evt) { |
| 60 |
getURL("cards/default.svg", setupCards); |
| 61 |
} |
| 62 |
|
| 63 |
function setupCards(result) { |
| 64 |
if (!result.content) |
| 65 |
return; |
| 66 |
var doc = parseXML(result.content, document); |
| 67 |
var fc; |
| 68 |
for (fc=doc.firstChild; fc; fc = fc.nextSibling) { |
| 69 |
if (fc.nodeName == "svg") break; |
| 70 |
} |
| 71 |
if (fc.nodeName != "svg") return; |
| 72 |
for (fc=fc.firstChild; fc; fc = fc.nextSibling) { |
| 73 |
if (fc.nodeName == "defs") break; |
| 74 |
} |
| 75 |
if (fc.nodeName != "defs") return; |
| 76 |
root.appendChild(fc); |
| 77 |
init(); |
| 78 |
} |
| 79 |
|
| 80 |
function init() { |
| 81 |
var deck = new Deck(document, 1, "", 75, 105); |
| 82 |
deck.shuffle(); |
| 83 |
DECK_PILES[0].suite = SUITE_DIAMOND; |
| 84 |
DECK_PILES[0].setDragCheck(deckDragCheck); |
| 85 |
DECK_PILES[0].setDropCheck(deckDropCheck); |
| 86 |
DECK_PILES[1].suite = SUITE_CLUB; |
| 87 |
DECK_PILES[1].setDragCheck(deckDragCheck); |
| 88 |
DECK_PILES[1].setDropCheck(deckDropCheck); |
| 89 |
DECK_PILES[2].suite = SUITE_HEART; |
| 90 |
DECK_PILES[2].setDragCheck(deckDragCheck); |
| 91 |
DECK_PILES[2].setDropCheck(deckDropCheck); |
| 92 |
DECK_PILES[3].suite = SUITE_SPADE; |
| 93 |
DECK_PILES[3].setDragCheck(deckDragCheck); |
| 94 |
DECK_PILES[3].setDropCheck(deckDropCheck); |
| 95 |
|
| 96 |
for (var i=0; i<4; i++) { |
| 97 |
HOLD_PILES[i].setDragCheck(holdDragCheck); |
| 98 |
HOLD_PILES[i].setDropCheck(holdDropCheck); |
| 99 |
} |
| 100 |
HOLD_PILES[0].addCard(deck.dealCard(true)); |
| 101 |
HOLD_PILES[3].addCard(deck.dealCard(true)); |
| 102 |
|
| 103 |
piles = new Array(); |
| 104 |
for (var i=0; i<10; i++) { |
| 105 |
piles[i] = new Pile(BOARD, 2.5+80*i, 120, 75, 105, 0, 25, 0, 0); |
| 106 |
piles[i].setDragCheck(dragCheck); |
| 107 |
piles[i].setDropCheck(dropCheck); |
| 108 |
} |
| 109 |
|
| 110 |
for (var y=0; y<5; y++) { |
| 111 |
for (var x=0; x<10; x++) { |
| 112 |
piles[x].addCard(deck.dealCard(true)); |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
towersMoveDone(); |
| 117 |
} |
| 118 |
|
| 119 |
function dragCheck(pile, card, index) { |
| 120 |
if (!allowDrag) return false; |
| 121 |
|
| 122 |
var sz = pile.size(); |
| 123 |
// Not enough free hold spots for drag. |
| 124 |
if ((sz - index) > (freeHold()+1)) |
| 125 |
return false; |
| 126 |
|
| 127 |
var prevCard = card; |
| 128 |
for (var i=index+1; i<sz; i++) { |
| 129 |
var c = pile.checkCard(i); |
| 130 |
if ((!prevCard.suiteMatch(c)) || |
| 131 |
(!prevCard.valueOneLower(c))) |
| 132 |
return false; |
| 133 |
prevCard = c; |
| 134 |
} |
| 135 |
return dragGroup; |
| 136 |
} |
| 137 |
|
| 138 |
function dropCheck(fromPile, toPile, cards) { |
| 139 |
var dragBottomCard = cards[0]; |
| 140 |
var pileTopCard = toPile.checkTopCard(); |
| 141 |
if (!pileTopCard) { |
| 142 |
if (dragBottomCard.getValue() != 13) |
| 143 |
return false; |
| 144 |
} else if ((!pileTopCard.suiteMatch(dragBottomCard)) || |
| 145 |
(!pileTopCard.valueOneLower(dragBottomCard))) { |
| 146 |
return false; |
| 147 |
} |
| 148 |
for (var i=0; i<cards.length; i++) { |
| 149 |
toPile.addCard(cards[i]); |
| 150 |
} |
| 151 |
return new SimpleMoveInfo(cards, fromPile, cards, toPile); |
| 152 |
} |
| 153 |
|
| 154 |
function freeHold() { |
| 155 |
var count = 0; |
| 156 |
for (var i=0; i<4; i++) { |
| 157 |
if (HOLD_PILES[i].size() == 0) count++; |
| 158 |
} |
| 159 |
return count; |
| 160 |
} |
| 161 |
|
| 162 |
function holdDragCheck(pile, card, index) { |
| 163 |
if (!allowDrag) return false; |
| 164 |
return dragGroup; |
| 165 |
} |
| 166 |
|
| 167 |
function holdDropCheck(fromPile, toPile, cards) { |
| 168 |
if ((toPile.cards.length == 0) && (cards.length == 1)) { |
| 169 |
toPile.addCard(cards[0]); |
| 170 |
return new SimpleMoveInfo(cards, fromPile, cards, toPile); |
| 171 |
} |
| 172 |
return false; |
| 173 |
} |
| 174 |
|
| 175 |
function deckDragCheck(pile, card, index) { |
| 176 |
return false; |
| 177 |
} |
| 178 |
|
| 179 |
function deckDropCheck(fromPile, toPile, cards) { |
| 180 |
if (toPile.suite != cards[0].suite) { |
| 181 |
return false; |
| 182 |
} |
| 183 |
var top = toPile.checkTopCard(); |
| 184 |
if (top == null) { |
| 185 |
if (cards[cards.length-1].getValue() != 1) |
| 186 |
return false; |
| 187 |
} else { |
| 188 |
if (! top.valueOneHigher(cards[cards.length-1])) |
| 189 |
return false; |
| 190 |
} |
| 191 |
|
| 192 |
// Success! |
| 193 |
var toCards = new Array(); |
| 194 |
for (var i=cards.length-1; i>=0; i--) { |
| 195 |
toCards.push(cards[i]); |
| 196 |
toPile.addCard(cards[i]); |
| 197 |
} |
| 198 |
return new SimpleMoveInfo(cards, fromPile, toCards, toPile); |
| 199 |
} |
| 200 |
|
| 201 |
function towersMoveDone() { |
| 202 |
for (var i=0; i<14; i++) { |
| 203 |
var pile; |
| 204 |
if (i<10) { |
| 205 |
pile = piles[i]; |
| 206 |
} else { |
| 207 |
pile = HOLD_PILES[i-10]; |
| 208 |
} |
| 209 |
var c = pile.checkTopCard(); |
| 210 |
while (c != null) { |
| 211 |
var suite = c.getSuite(); |
| 212 |
var suitePile = DECK_PILES[suite-1]; |
| 213 |
var spc = suitePile.checkTopCard(); |
| 214 |
if (spc == null) { |
| 215 |
if (c.getValue() != 1) |
| 216 |
break; |
| 217 |
} else if (!spc.valueOneHigher(c)) { |
| 218 |
break; |
| 219 |
} |
| 220 |
var mi1 = BOARD.getMoveInfo(); |
| 221 |
var cs = new Array(); |
| 222 |
cs.push(c); |
| 223 |
var mi2 = new SimpleMoveInfo(cs, pile, cs, suitePile); |
| 224 |
var mi = new MultiMoveInfo(mi1, mi2); |
| 225 |
BOARD.setMoveInfo(mi); |
| 226 |
|
| 227 |
suitePile.moveCardTo(c, 40); |
| 228 |
setTimeout("towersMoveDone()", 150); |
| 229 |
allowDrag = false; |
| 230 |
return; |
| 231 |
} |
| 232 |
} |
| 233 |
|
| 234 |
allowDrag = true; |
| 235 |
|
| 236 |
for (var i=0; i<10; i++) { |
| 237 |
var pile = piles[i]; |
| 238 |
if (pile.checkTopCard() != null) { |
| 239 |
return; |
| 240 |
} |
| 241 |
} |
| 242 |
|
| 243 |
BOARD.won(); |
| 244 |
} |
| 245 |
|
| 246 |
function showMore() { |
| 247 |
var moreG = document.getElementById("more"); |
| 248 |
if (!moreG) return; |
| 249 |
var style = moreG.style; |
| 250 |
if (style.getPropertyValue("display") == "inline") { |
| 251 |
hideMore(); |
| 252 |
return; |
| 253 |
} |
| 254 |
style.setProperty("display", "inline", ""); |
| 255 |
style.setProperty("pointer-events", "fill", ""); |
| 256 |
moreG.addEventListener("click", hideMore, false); |
| 257 |
} |
| 258 |
|
| 259 |
function hideMore() { |
| 260 |
var moreG = document.getElementById("more"); |
| 261 |
if (!moreG) return; |
| 262 |
moreG.removeEventListener("click", hideMore, false); |
| 263 |
moreG.style.setProperty("pointer-events", "none", ""); |
| 264 |
moreG.style.setProperty("display", "none", ""); |
| 265 |
} |
| 266 |
|
| 267 |
]]></script> |
| 268 |
|
| 269 |
<g id="background" style="pointer-events:none;"> |
| 270 |
<rect x="0" y="0" width="100%" height="100%" fill="#080" pointer-events="fill"/> |
| 271 |
<rect rx="6" ry="6" x="7.5" y="5" width="65" height="104" |
| 272 |
fill="white" stroke="black"/> |
| 273 |
<g transform="translate(7.5, 5)"> |
| 274 |
<path fill="#FF0000" d="M49.662,52.177L32.643,78.178L15.625,52.177 |
| 275 |
l17.019-26.001L49.662,52.177z"/> |
| 276 |
<path fill="none" stroke="#FFFFFF" stroke-width="2" |
| 277 |
d="M32.643,32.567c3.657,5.587,11.083,16.932,12.836,19.61 |
| 278 |
c-1.753,2.678-9.179,14.022-12.836,19.61 |
| 279 |
c-3.657-5.588-11.083-16.933-12.836-19.61 |
| 280 |
C21.56,49.499,28.986,38.154,32.643,32.567z |
| 281 |
M32.643,32.567c3.657,5.587,11.083,16.932,12.836,19.61 |
| 282 |
c-1.753,2.678-9.179,14.022-12.836,19.61 |
| 283 |
c-3.657-5.588-11.083-16.933-12.836-19.61 |
| 284 |
C21.56,49.499,28.986,38.154,32.643,32.567z"/> |
| 285 |
<path fill="#FFFFFF" d="M29.194,45.139 |
| 286 |
c0,0,1.726-2.635,3.449-5.269c1.724,2.634,6.388,9.758,8.056,12.306 |
| 287 |
c-1.6,2.442-4.95,7.563-8.056,12.307 |
| 288 |
c-3.105-4.744-6.456-9.864-8.056-12.307 |
| 289 |
C26.255,49.629,29.194,45.139,29.194,45.139z"/> |
| 290 |
<path fill="#FFFFFF" d="M29.194,45.139c0,0,1.726-2.635,3.449-5.269 |
| 291 |
c1.724,2.634,6.388,9.758,8.056,12.306 |
| 292 |
c-1.6,2.442-4.95,7.563-8.056,12.307 |
| 293 |
c-3.105-4.744-6.456-9.864-8.056-12.307 |
| 294 |
C26.255,49.629,29.194,45.139,29.194,45.139z |
| 295 |
M29.194,45.139c0,0,1.726-2.635,3.449-5.269 |
| 296 |
c1.724,2.634,6.388,9.758,8.056,12.306 |
| 297 |
c-1.6,2.442-4.95,7.563-8.056,12.307 |
| 298 |
c-3.105-4.744-6.456-9.864-8.056-12.307 |
| 299 |
C26.255,49.629,29.194,45.139,29.194,45.139z"/> |
| 300 |
<path d="M25.587,52.177c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 301 |
s0.447-1,1-1S25.587,51.625,25.587,52.177z"/> |
| 302 |
<path d="M33.643,39.871c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 303 |
s0.447-1,1-1S33.643,39.318,33.643,39.871z"/> |
| 304 |
<path d="M41.699,52.177c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 305 |
s0.447-1,1-1S41.699,51.625,41.699,52.177z"/> |
| 306 |
<path d="M33.643,64.483c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 307 |
s0.447-1,1-1S33.643,63.932,33.643,64.483z"/> |
| 308 |
<path d="M29.106,57.552c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 309 |
s0.447-1,1-1S29.106,57,29.106,57.552z"/> |
| 310 |
<path d="M38.18,57.552c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 311 |
s0.447-1,1-1S38.18,57,38.18,57.552z"/> |
| 312 |
<path d="M38.18,46.802c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 313 |
s0.447-1,1-1S38.18,46.25,38.18,46.802z"/> |
| 314 |
<path d="M29.105,46.802c0,0.552-0.447,1-1,1s-1-0.448-1-1 |
| 315 |
s0.447-1,1-1S29.105,46.25,29.105,46.802z"/> |
| 316 |
<path d="M33.643,78.178c0,0.551-0.447,1-1,1s-1-0.449-1-1 |
| 317 |
c0-0.553,0.447-1,1-1S33.643,77.625,33.643,78.178z"/> |
| 318 |
<path d="M50.662,52.177c0,0.551-0.447,1-1,1s-1-0.449-1-1 |
| 319 |
c0-0.553,0.447-1,1-1S50.662,51.624,50.662,52.177z"/> |
| 320 |
<path d="M33.643,26.176c0,0.551-0.447,1-1,1s-1-0.449-1-1 |
| 321 |
c0-0.553,0.447-1,1-1S33.643,25.623,33.643,26.176z"/> |
| 322 |
<path d="M16.625,52.177c0,0.551-0.447,1-1,1s-1-0.449-1-1 |
| 323 |
c0-0.553,0.447-1,1-1S16.625,51.624,16.625,52.177z"/> |
| 324 |
</g> |
| 325 |
<rect rx="6" ry="6" x="87.5" y="5" width="65" height="104" |
| 326 |
fill="white" stroke="black"/> |
| 327 |
<g transform="translate(87.5, 5)"> |
| 328 |
<path d="M29.224,57.547c0,7.585-3.034,14.412-8.344,14.412v1.517h24.273 |
| 329 |
v-1.517c-6.068,0-8.345-6.827-8.345-14.412 |
| 330 |
c2.774,3.661,7.948,4.469,11.707,1.829 |
| 331 |
c3.856-2.709,4.787-8.032,2.078-11.888s-8.032-4.787-11.889-2.078 |
| 332 |
c3.287-3.325,3.287-8.675,0-12c-3.313-3.351-8.717-3.382-12.068-0.068 |
| 333 |
c-3.351,3.313-3.382,8.717-0.068,12.068 |
| 334 |
c-3.759-2.641-8.933-1.832-11.706,1.829 |
| 335 |
c-2.847,3.756-2.109,9.108,1.647,11.955 |
| 336 |
c3.756,2.847,9.108,2.108,11.955-1.647"/> |
| 337 |
<path fill="#FFFFFF" d="M25.282,52.542c0,2.139-1.734,3.873-3.873,3.873 |
| 338 |
s-3.873-1.734-3.873-3.873s1.734-3.873,3.873-3.873 |
| 339 |
S25.282,50.403,25.282,52.542z"/> |
| 340 |
<path fill="#FFFFFF" d="M47.532,52.542c0,2.139-1.734,3.873-3.873,3.873 |
| 341 |
s-3.873-1.734-3.873-3.873s1.734-3.873,3.873-3.873 |
| 342 |
S47.532,50.403,47.532,52.542z"/> |
| 343 |
<path fill="#FFFFFF" d="M36.579,39.411c0,2.139-1.734,3.873-3.873,3.873 |
| 344 |
s-3.873-1.734-3.873-3.873s1.734-3.873,3.873-3.873 |
| 345 |
S36.579,37.272,36.579,39.411z"/> |
| 346 |
</g> |
| 347 |
|
| 348 |
<rect rx="6" ry="6" x="647.5" y="5" width="65" height="104" |
| 349 |
fill="white" stroke="black"/> |
| 350 |
<g transform="translate(647.5, 5)"> |
| 351 |
<path fill="#FF0000" d="M13.143,42.426 |
| 352 |
c0-6.118,3.822-11.088,8.411-11.088c6.118,0,11.089,4.971,11.089,11.088 |
| 353 |
c0-6.118,4.971-11.088,11.089-11.088c4.588,0,8.412,4.971,8.412,11.088 |
| 354 |
c0,8.03-16.824,17.207-19.501,30.589 |
| 355 |
C29.966,59.633,13.143,50.456,13.143,42.426z"/> |
| 356 |
<path fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" |
| 357 |
stroke-miterlimit="7" stroke-dasharray="0 6.139" |
| 358 |
d="M32.643,30.822c-2.89-2.762-6.784-4.484-11.089-4.484 |
| 359 |
c-7.395,0-13.411,7.217-13.411,16.088c0,5.695,4.452,10.55,9.166,15.69 |
| 360 |
c4.35,4.741,9.278,10.116,10.431,15.88c0.468,2.337,2.52,4.02,4.903,4.02 |
| 361 |
s4.436-1.683,4.903-4.02c1.152-5.764,6.082-11.139,10.431-15.88 |
| 362 |
c4.714-5.14,9.167-9.995,9.167-15.69c0-8.871-6.017-16.088-13.412-16.088 |
| 363 |
C39.427,26.338,35.533,28.06,32.643,30.822z"/> |
| 364 |
<path d="M32.643,53.509c-0.749-2.514-1.698-4.628-4.891-7.82 |
| 365 |
c-2.132-2.132-3.111-4.239-3.111-6.42c0-1.104-0.896-2-2-2 |
| 366 |
s-2,0.896-2,2c0,4.18,2.668,6.36,5.021,8.285 |
| 367 |
c2.562,2.094,5.259,5.044,5.909,9.791 |
| 368 |
c0.266,1.938,0.411,4.157,1.071,4.817 |
| 369 |
c0.66-0.66,0.806-2.879,1.071-4.817 |
| 370 |
c0.65-4.747,3.348-7.697,5.909-9.791c2.354-1.924,5.021-4.105,5.021-8.285 |
| 371 |
c0-1.104-0.896-2-2-2s-2,0.896-2,2c0,2.182-0.979,4.289-3.111,6.42 |
| 372 |
C34.341,48.881,33.392,50.995,32.643,53.509z"/> |
| 373 |
<path fill="#FFFFFF" d="M43.77,39.268 |
| 374 |
c0,0.621-0.504,1.125-1.125,1.125s-1.125-0.504-1.125-1.125 |
| 375 |
s0.504-1.125,1.125-1.125S43.77,38.647,43.77,39.268z"/> |
| 376 |
<path fill="#FFFFFF" d="M23.766,39.268 |
| 377 |
c0,0.621-0.504,1.125-1.125,1.125s-1.125-0.504-1.125-1.125 |
| 378 |
s0.504-1.125,1.125-1.125S23.766,38.647,23.766,39.268z"/> |
| 379 |
</g> |
| 380 |
<rect rx="6" ry="6" x="727.5" y="5" width="65" height="104" |
| 381 |
fill="white" stroke="black"/> |
| 382 |
<g transform="translate(727.5, 5)"> |
| 383 |
<path fill="#000" d="M49.723,52.583c1.456,1.402,2.322,3.306,2.421,5.325 |
| 384 |
c0.213,4.374-3.159,8.093-7.532,8.306 |
| 385 |
c-4.374,0.214-8.092-3.158-8.306-7.532 |
| 386 |
c0,9.352,2.439,13.417,8.132,13.417v1.627H20.856v-1.627 |
| 387 |
c5.692,0,8.132-4.065,8.132-13.417c-0.099,2.02-0.965,3.924-2.421,5.325 |
| 388 |
c-3.154,3.037-8.173,2.941-11.21-0.213 |
| 389 |
c-3.036-3.155-2.94-8.174,0.214-11.21 |
| 390 |
c3.253-3.253,11.384-9.758,17.076-21.955 |
| 391 |
C38.339,42.826,46.47,49.331,49.723,52.583z"/> |
| 392 |
<path fill="#FFF" d="M25.115,58.682c0,2.139-1.734,3.873-3.873,3.873 |
| 393 |
s-3.873-1.734-3.873-3.873s1.734-3.873,3.873-3.873 |
| 394 |
S25.115,56.543,25.115,58.682z"/> |
| 395 |
<path fill="#FFF" d="M48.485,58.682c0,2.139-1.734,3.873-3.873,3.873 |
| 396 |
s-3.873-1.734-3.873-3.873s1.734-3.873,3.873-3.873 |
| 397 |
S48.485,56.543,48.485,58.682z"/> |
| 398 |
<path fill="#F00" d="M21.631,52.328 |
| 399 |
c3.035-2.934,7.202-11.569,11.016-17.667 |
| 400 |
c3.836,6.134,8.028,14.783,11.068,17.718 |
| 401 |
c-3.042,0.432-5.398,3.015-5.469,6.157 |
| 402 |
c0-12.762-1.508-17.526-5.6-21.618 |
| 403 |
c-4.092,4.092-5.039,8.856-5.039,21.632 |
| 404 |
C27.54,55.229,24.919,52.528,21.631,52.328z"/> |
| 405 |
</g> |
| 406 |
|
| 407 |
<g transform="translate(242.5, 5)" clip-path="url(#castleClip)"> |
| 408 |
<linearGradient id="sky" x1=".5" y1="1" x2=".5" y2="0"> |
| 409 |
<stop offset="0.5" style="stop-color:#8E7BFF"/> |
| 410 |
<stop offset="1" style="stop-color:#810062"/> |
| 411 |
</linearGradient> |
| 412 |
<linearGradient id="castle" x1="0" y1=".5" x2="1" y2=".5"> |
| 413 |
<stop offset="0" style="stop-color:#898989"/> |
| 414 |
<stop offset="0.3" style="stop-color:#A7A9A9"/> |
| 415 |
<stop offset="1" style="stop-color:#898989"/> |
| 416 |
</linearGradient> |
| 417 |
<clipPath id="castleClip"> |
| 418 |
<rect rx="6" ry="6" x=".5" y=".5" width="74" height="105"/> |
| 419 |
<rect rx="6" ry="6" x="80.5" y=".5" width="74" height="105"/> |
| 420 |
<rect rx="6" ry="6" x="160.5" y=".5" width="74" height="105"/> |
| 421 |
<rect rx="6" ry="6" x="240.5" y=".5" width="74" height="105"/> |
| 422 |
</clipPath> |
| 423 |
|
| 424 |
<rect fill="url(#sky)" x=".5" y=".5" width="315" height="105"/> |
| 425 |
<g fill="#FFFFA9"> |
| 426 |
<path d="M10,39h-1v-1h1z"/> |
| 427 |
<path d="M18,16h-1v-1h1z"/> |
| 428 |
<path d="M33,25h-1v-1h1z"/> |
| 429 |
<path d="M46,12h-1v-1h1z"/> |
| 430 |
<path d="M59,31h-1v-1h1z"/> |
| 431 |
<path d="M92,18h-1v-1h1z"/> |
| 432 |
<path d="M99,29h-1v-1h1z"/> |
| 433 |
<path d="M127,37h-1v-1h1z"/> |
| 434 |
<path d="M140,10h-1v-1h1z"/> |
| 435 |
<path d="M182,15h-1v-1h1z"/> |
| 436 |
<path d="M224,20h-1v-1h1z"/> |
| 437 |
<path d="M230,39h-1v-1h1z"/> |
| 438 |
<path d="M253,46h-1v-1h1z"/> |
| 439 |
<path d="M254,15h-1v-1h1z"/> |
| 440 |
<path d="M262,32h-1v-1h1z"/> |
| 441 |
<path d="M274,20h-1v-1h1z"/> |
| 442 |
<path d="M280,43h-1v-1h1z"/> |
| 443 |
<path d="M291,27h-1v-1h1z"/> |
| 444 |
<path d="M312,39h-1v-1h1z"/> |
| 445 |
</g> |
| 446 |
<path fill="#C3C7D8" |
| 447 |
d="M127.333,50.667c0,10.494-8.506,19-19,19s-19-8.506-19-19 |
| 448 |
s8.506-19,19-19S127.333,40.173,127.333,50.667z"/> |
| 449 |
|
| 450 |
<path fill="#FFFFFF" stroke="#000000" |
| 451 |
d="M257.11,68.541c-30.157-7.08-27.901-22.959-77.54-22.959 |
| 452 |
c-27.382,0-61.187,9.457-71.545,16.265 |
| 453 |
c-7.651-4.001-17.214-7.379-29.618-9.288 |
| 454 |
c-25.283-3.89-54.651,0-77.907,11.627V105.5h315 |
| 455 |
V71.163C286.928,72.842,269.354,71.415,257.11,68.541z"/> |
| 456 |
<path fill="none" stroke="#000000" |
| 457 |
d="M0.5,64.186c23.256-11.627,52.624-15.518,77.907-11.627 |
| 458 |
c30.232,4.651,43.604,18.023,53.488,27.907"/> |
| 459 |
<path fill="none" stroke="#000000" |
| 460 |
d="M108.025,61.846c10.358-6.808,44.163-16.265,71.545-16.265 |
| 461 |
c69.789,0,36.976,31.396,135.93,25.582"/> |
| 462 |
|
| 463 |
<g fill="url(#castle)" stroke="#000"> |
| 464 |
<path d="M177.5,50h-7V27.5h7V50z"/> |
| 465 |
<path fill="#898989" d="M201,50h-23.5V34H201V50z"/> |
| 466 |
<path d="M208,50h-7V27.5h7V50z"/> |
| 467 |
<path fill="#9E6D5C" |
| 468 |
d="M191.922,50c0,0,0-4.658,0-6s0-3.704-2.672-5.409 |
| 469 |
c-2.672,1.705-2.672,4.066-2.672,5.409s0,6,0,6"/> |
| 470 |
<g stroke-width="0.5"> |
| 471 |
<path d="M178.485,21.22v1.93h-1.409v-1.93h-2.227v1.93h-1.485v-1.93 |
| 472 |
h-2.227v1.93h-1.559v-1.93h-2.227v1.93h1.147v4.35h11 |
| 473 |
v-4.35h1.212v-1.93H178.485z"/> |
| 474 |
<path d="M208.985,21.22v1.93h-1.409v-1.93h-2.227v1.93h-1.485v-1.93 |
| 475 |
h-2.227v1.93h-1.559v-1.93h-2.227v1.93H199v4.35h11v-4.35h1.212 |
| 476 |
v-1.93H208.985z"/> |
| 477 |
<path fill="#9B9B49" |
| 478 |
d="M205.836,39.056c0,0,0-2.329,0-3s0-1.852-1.336-2.705 |
| 479 |
c-1.336,0.853-1.336,2.033-1.336,2.705s0,3,0,3H205.836z"/> |
| 480 |
<path fill="#9B9B49" |
| 481 |
d="M175.336,39.056c0,0,0-2.329,0-3s0-1.852-1.336-2.705 |
| 482 |
c-1.336,0.853-1.336,2.033-1.336,2.705s0,3,0,3H175.336z"/> |
| 483 |
</g> |
| 484 |
</g> |
| 485 |
</g> |
| 486 |
|
| 487 |
<g fill="none" stroke="white" stroke-width="1"> |
| 488 |
<rect rx="6" ry="6" x="7.5" y="120" width="64" height="104"/> |
| 489 |
<rect rx="6" ry="6" x="87.5" y="120" width="64" height="104"/> |
| 490 |
<rect rx="6" ry="6" x="167.5" y="120" width="64" height="104"/> |
| 491 |
<rect rx="6" ry="6" x="247.5" y="120" width="64" height="104"/> |
| 492 |
<rect rx="6" ry="6" x="327.5" y="120" width="64" height="104"/> |
| 493 |
<rect rx="6" ry="6" x="407.5" y="120" width="64" height="104"/> |
| 494 |
<rect rx="6" ry="6" x="487.5" y="120" width="64" height="104"/> |
| 495 |
<rect rx="6" ry="6" x="567.5" y="120" width="64" height="104"/> |
| 496 |
<rect rx="6" ry="6" x="647.5" y="120" width="64" height="104"/> |
| 497 |
<rect rx="6" ry="6" x="727.5" y="120" width="64" height="104"/> |
| 498 |
</g> |
| 499 |
|
| 500 |
<text x="10" y="560" fill="white" font-size="20">z/Z <tspan x="45" |
| 501 |
>- Undo move</tspan></text> |
| 502 |
<rect fill="none" stroke="none" |
| 503 |
pointer-events="fill" onclick="BOARD.undoMove()" |
| 504 |
x="0" y="540" width="170" height="22"/> |
| 505 |
|
| 506 |
<text x="10" y="580" fill="white" font-size="20">r/R <tspan x="45" |
| 507 |
>- Redo move</tspan></text> |
| 508 |
<rect fill="none" stroke="none" |
| 509 |
pointer-events="fill" onclick="BOARD.redoMove()" |
| 510 |
x="0" y="562" width="170" height="22"/> |
| 511 |
<text x="790" y="580" fill="white" font-size="20" text-anchor="end" |
| 512 |
>? - Get Help</text> |
| 513 |
<rect fill="none" stroke="none" |
| 514 |
pointer-events="fill" onclick="BOARD.showHelp()" |
| 515 |
x="675" y="560" width="125" height="25"/> |
| 516 |
</g> |
| 517 |
|
| 518 |
<g id="cards"/> |
| 519 |
|
| 520 |
<g id="move" style="pointer-events:none; opacity: 0.75;"> |
| 521 |
<g id="drag" style="pointer-events:none; opacity: 0.75;"/> |
| 522 |
</g> |
| 523 |
|
| 524 |
<g id="win" style="display:none; pointer-events:none; "> |
| 525 |
<rect x="0" y="115" width="800" height="485" fill="#008" |
| 526 |
fill-opacity="0.75"/> |
| 527 |
<text x="50%" y="50%" text-anchor="middle" |
| 528 |
font-size="72" fill="white">Completed!!!</text> |
| 529 |
</g> |
| 530 |
|
| 531 |
<g id="help" style="display:none; pointer-events:none; "> |
| 532 |
<rect x="0" y="115" width="800" height="485" fill="#008" |
| 533 |
fill-opacity="0.85"/> |
| 534 |
<text x="50%" y="160" font-size="36" fill="white" text-anchor="middle" |
| 535 |
>Towers du Alice</text> |
| 536 |
<text x="50" y="190" font-size="18" fill="white" |
| 537 |
>This is a solitare game, as with most |
| 538 |
<tspan x="50" dy="1.2em">the basic rules are very simple.</tspan> |
| 539 |
|
| 540 |
<tspan x="50" dy="2em">The main playing field is ten colums of</tspan> |
| 541 |
<tspan x="50" dy="1.2em">five cards each. Above the playing field</tspan> |
| 542 |
<tspan x="50" dy="1.2em">to either side are four 'deck' piles, one</tspan> |
| 543 |
<tspan x="50" dy="1.2em">for each suite, etween these are the</tspan> |
| 544 |
<tspan x="50" dy="1.2em">four Towers.</tspan> |
| 545 |
|
| 546 |
<tspan x="50" dy="2em">To start most cards are delt into the</tspan> |
| 547 |
<tspan x="50" dy="1.2em">playing field. The last two cards are</tspan> |
| 548 |
<tspan x="50" dy="1.2em">placed in two of the Towers.</tspan> |
| 549 |
|
| 550 |
<tspan x="50" dy="2em">In the main playing field only a card of</tspan> |
| 551 |
<tspan x="50" dy="1.2em">the same suite and one lower value can</tspan> |
| 552 |
<tspan x="50" dy="1.2em">be placed on another card in the</tspan> |
| 553 |
<tspan x="50" dy="1.2em">playing field. You are only allowed to</tspan> |
| 554 |
<tspan x="50" dy="1.2em">'pick up' one card at a time. As a</tspan> |
| 555 |
<tspan x="50" dy="1.2em">convieniece the game will allow you</tspan> |
| 556 |
<tspan x="50" dy="1.2em">to 'pick up' runs of cards if you have</tspan> |
| 557 |
|
| 558 |
<tspan x="425" y="190">enough open Towers that you could</tspan> |
| 559 |
<tspan x="425" dy="1.2em">have moved the lower cards into first.</tspan> |
| 560 |
|
| 561 |
<tspan x="425" dy="2em">The Towers are your most important</tspan> |
| 562 |
<tspan x="425" dy="1.2em">asset in the game. Each Tower can hold</tspan> |
| 563 |
<tspan x="425" dy="1.2em">one card. You can put any card you want</tspan> |
| 564 |
<tspan x="425" dy="1.2em">at any time, you can also remove cards</tspan> |
| 565 |
<tspan x="425" dy="1.2em">from the towers at any time.</tspan> |
| 566 |
|
| 567 |
<tspan x="425" dy="2em">The game will automatically clear cards</tspan> |
| 568 |
<tspan x="425" dy="1.2em">to the deck when possible. Unlike</tspan> |
| 569 |
<tspan x="425" dy="1.2em">traditional Solitare this is never</tspan> |
| 570 |
<tspan x="425" dy="1.2em">a bad move.</tspan> |
| 571 |
|
| 572 |
<tspan x="425" dy="2em">This game includes Undo/Redo, this</tspan> |
| 573 |
<tspan x="425" dy="1.2em">should pose no ethical dilema as all</tspan> |
| 574 |
<tspan x="425" dy="1.2em">cards are visible from the start.</tspan> |
| 575 |
<tspan x="425" dy="2em" |
| 576 |
>Get comfortable with Undo,</tspan> |
| 577 |
<tspan x="425" dy="1.2em">you will use it often.</tspan> |
| 578 |
</text> |
| 579 |
|
| 580 |
<rect x="675" y="555" width="115" height="35" rx="3" ry="3" |
| 581 |
fill="#001473" stroke="white" stroke-width="2" onclick="showMore()"/> |
| 582 |
<text x="732.5" y="580" fill="white" font-size="20" text-anchor="middle" |
| 583 |
pointer-events="none" >More Info</text> |
| 584 |
</g> |
| 585 |
|
| 586 |
<g id="more" style="display:none; pointer-events:none; "> |
| 587 |
<rect x="0" y="115" width="800" height="485" fill="#001473" /> |
| 588 |
<text x="50%" y="160" font-size="36" fill="white" text-anchor="middle" |
| 589 |
>Towers du Alice</text> |
| 590 |
<text x="50%" y="190" font-size="18" fill="white" text-anchor="middle" |
| 591 |
>Art Cabral, author of the popular Seahaven Towers<tspan font-size=".6em" baseline-shift="6">(TM)</tspan> |
| 592 |
<tspan x="50%" dy="1.2em">game, has assigned a proper name to the card game,</tspan> |
| 593 |
<tspan x="50%" dy="1.2em">naming it after its discoverer, Alice Drennen.</tspan> |
| 594 |
<tspan x="50%" dy="1.2em">Art Cabral's product will still be called Seahaven Towers<tspan font-size=".6em" baseline-shift="6">(TM)</tspan>,</tspan> |
| 595 |
|
| 596 |
<tspan x="50%" dy="1.2em">but the solitaire card game itself will be named</tspan> |
| 597 |
<tspan x="50%" dy="1.2em">"Towers du Alice."</tspan> |
| 598 |
</text> |
| 599 |
</g> |
| 600 |
|
| 601 |
</svg> |