|
| 1 | +import { Container as SVGContainer, Symbol as SVGSymbol } from "@svgdotjs/svg.js"; |
| 2 | +import type { ISheet } from "./ISheet"; |
| 3 | + |
| 4 | +const sheet: ISheet = { |
| 5 | + name: "arimaa", |
| 6 | + // tslint:disable-next-line:object-literal-sort-keys |
| 7 | + description: "Arimaa glyphs from Wikimedia", |
| 8 | + cellsize: 100, |
| 9 | + glyphs: new Map<string, (canvas: SVGContainer) => SVGSymbol>(), |
| 10 | +}; |
| 11 | + |
| 12 | +// Alphabetize by glyph name, please! |
| 13 | +// The element's root `id` must be the same as its map key. |
| 14 | +// If using groups to make complex glyphs, be sure to include the attribute `data-cellsize` (the greater of width and height) so the renderer can scale it properly. |
| 15 | + |
| 16 | +sheet.glyphs.set("arimaa-camel", (canvas: SVGContainer) => { |
| 17 | + const group = canvas.symbol(); |
| 18 | + group.path("M5.69 17.993c-.719 0-1.119-.638-1.413-1.106-.09-.145-.192-.31-.263-.377-.383-.385-2.334-1.783-3.55-2.628l-.354-.245.144-.408c.004-.016.55-1.598.489-3.939C.396 8.78-.42 7.205.266 4.353c-.142-.775-.492-3.297.922-3.945L1.3.357l.184-.014c.208 0 .402.088.552.251.116.125.23.312.302.671.057-.308.163-.601.351-.827C2.926.151 3.253 0 3.635 0c.598-.002.829.552.903 2.311H5.92c.5 0 1.498.056 2.152.492a50 50 0 0 0 1.457.92l3.227-.036c.943.086 2.442.596 2.465 1.97.02 1.249-.184 2.048-.644 2.514a1.3 1.3 0 0 1-.401.287.8.8 0 0 1 .002.192c-.018.274-.149.671-.663 1.013q-.369.245-.88.245c-.802 0-1.759-.458-2.53-.829-.217-.104-.417-.2-.587-.275l-.082.003c-.24.45-.729 1.212-1.441 1.536.317 1.22.834 4.051-.492 6.167-.643 1.025-1.203 1.483-1.813 1.483") |
| 19 | + .attr("data-playerfill2", true) |
| 20 | + .fill("#000"); |
| 21 | + group.path("M.785 13.419s.617-1.735.518-4.326c0 0-1.296-1.415-.458-4.723 0 0-.597-2.911.579-3.448 0 0 .617-.358.378 2.531 0 0 .378-.618 1.136-.658 0 0-.438-2.232.698-2.232 0 0 .3-.14.359 2.312h1.894s1.215-.041 1.874.398c.656.439 1.613 1.017 1.613 1.017l3.388-.04s1.874.18 1.894 1.415-.179 2.512-1.296 2.352c0 0 .677.618-.159 1.176s-2.671-.597-3.588-.957l-.538.02S8.36 9.95 7.284 9.93c0 0 1.316 3.767-.259 6.278s-2.052.457-2.611-.101S.785 13.419.785 13.419") |
| 22 | + .attr("data-playerfill", true) |
| 23 | + .fill("#fff"); |
| 24 | + group.path("m2.101 4.648.079-.119s-1.253-.768-.717-2.651l.04-.479c-.001 0-1.076 2.093.598 3.249m-.18 4.725-.2.239C5.409 12.483 8.22 8.136 8.22 8.136h.419l.199-.259h-.697c-3.329 3.967-6.22 1.496-6.22 1.496m2.751-4.565c-.737-.02-1.335 1.396.02 1.615s.957-.399 1.315-.937-.598-.658-1.335-.678m9.447.698s-.798-.938-1.494.299c0 0 .817-.319.877.399.06.717.494 1.354.437 0-.02-.479.201-.499.201-.499zm-3.017 2.302s2.013.364 2.081.344V7.97s-1.177-.123-2.013-.365zM3.661 2.844s-.053-1.375.123-1.446l-.07-.388s-.441.652-.265 1.798z") |
| 25 | + .attr("data-playerfill2", true) |
| 26 | + .fill("#000"); |
| 27 | + group.viewbox(0, 0, 15.223, 17.993); |
| 28 | + return group; |
| 29 | +}); |
| 30 | + |
| 31 | +sheet.glyphs.set("arimaa-cat", (canvas: SVGContainer) => { |
| 32 | + const group = canvas.symbol(); |
| 33 | + group.path("M7.606 14.236c-1.096 0-2.157-.081-2.203-.084l-.26-.019-.088-.251c-.017-.047-.407-1.127-1.763-1.323-1.064-.152-1.554-.358-1.696-.712a.5.5 0 0 1-.012-.344c.053-.419.445-2.555 3.015-5.064.071-.28.27-.915.697-1.304.018-.524.142-1.848.89-2.473a.97.97 0 0 1 .63-.23c.763 0 1.532.872 1.87 1.31.227-.03.566-.074.838-.091.209-.557.797-1.715 2.138-2.017l.228-.052.156.173c.038.04.35.413.122 1.03-.114.31-.435 1.132-.588 1.52.247.338.546.794.655 1.146.397.285.876.824.769 1.45l.352.217c.278.107.677.521.514 1.15.108.317.301 1.069.008 1.717-.176.386-.504.67-.948.818-.028.017-.695.328-1.272.328q-.091 0-.176-.01c-.523.49-1.138 1.012-1.618 1.266.083.345.135.85-.106 1.25-.138.227-.423.511-1.006.558-.351.03-.75.041-1.146.041") |
| 34 | + .attr("data-playerfill2", true) |
| 35 | + .fill("#000"); |
| 36 | + group.path("M1.975 11.606s.172-2.256 2.987-4.963c0 0 .192-.967.73-1.31 0 0-.022-1.72.751-2.364.773-.645 2.063 1.203 2.063 1.203s.99-.15 1.31-.129c0 0 .41-1.676 1.934-2.02 0 0 .194.216.044.624s-.667 1.718-.667 1.718.752.988.752 1.332c0 0 1.053.623.645 1.375l.622.387s.537.214.301.816c0 0 .71 1.698-.645 2.15 0 0-.944.45-1.439.257 0 0-1.548 1.483-1.998 1.46 0 0 .665 1.547-.645 1.654-1.31.108-3.286-.043-3.286-.043s-.452-1.354-2.084-1.59-1.375-.557-1.375-.557") |
| 37 | + .attr("data-playerfill", true) |
| 38 | + .fill("#fff"); |
| 39 | + group.path("m4.982 7.567-.3.128c-.387 5.244 4.232 4.061 4.232 4.061l-.021-.344c-4.813.645-3.91-3.845-3.91-3.845m8.1 1.268-.236.02v.43c.02.882-1.955.71-1.955.71v.236c1.977.192 2.083-.516 2.083-.516l.15.15.151-.086v-.128c-.3 0-.193-.816-.193-.816m.012-1.185-.05-.07-.082.023-.6.17-.097.029.01.099c.055.56.416.56.765.56.158 0 .226-.083.25-.133.11-.208-.121-.573-.196-.678m-.853-.719.083.019.045-.071c.237-.366-.182-.788-.465-.98l-.167-.113-.02.2-.043.463c-.001.344.51.47.567.482m-2.231-.568a.864.864 0 0 0-.946.817c.129.473 1.311.495 1.311.495l.473-.774s.086-.538-.838-.538m-3.296.604c.03-1.274.224-1.445.378-1.584.074-.065.156-.138.216-.286.046-.117.271-.134.402-.134.387 0 .866.139.87.14l.283.083-.145-.256c-.008-.015-1.062-1.548-1.736-1.548-.132 0-.31.054-.413.316-.542 1.366-.11 3.216-.092 3.294z") |
| 40 | + .attr("data-playerfill2", true) |
| 41 | + .fill("#000"); |
| 42 | + group.viewbox(0, 0, 15.593, 15.818); |
| 43 | + return group; |
| 44 | +}); |
| 45 | + |
| 46 | +sheet.glyphs.set("arimaa-dog", (canvas: SVGContainer) => { |
| 47 | + const group = canvas.symbol(); |
| 48 | + group.path("M6.712 16.824c-.904-.159-1.117-.354-1.472-.744-.253-.277-.634-.692-1.712-1.393-2.514-1.635-3.036-3.038-2.323-6.243l.022-.103.068-.082c.082-.102 1.955-2.39 4.287-2.992l.32-1.052c.018-.07.578-2.341 2.078-2.857.21-.073.41-.094.59-.063a.9.9 0 0 1 .607.4c.331.477.31 1.297.256 1.829l.979.152c.514-.554 2.087-2.084 3.62-1.877l.374.05.015.378c.003.107.001 1.059-1.174 2.815.113.202.236.504.28.88l.07.646c.19.181.49.524.55.936q1.057.683 1.449 1.073c.148.006.358.022.563.058 1.015.179 1.031.736.99.966q-.076.425-.13.63c.158.296.392.886.178 1.464q-.251.67-1.125.95c-.254.245-.937.74-2.15.527-1.294-.228-3.277-.51-3.279-.51-.144-.017-1.503-.129-1.833 1.318l-.35 1.802a.9.9 0 0 1-.198.742c-.292.335-.796.433-1.55.3") |
| 49 | + .attr("data-playerfill2", true) |
| 50 | + .fill("#000"); |
| 51 | + group.path("M1.643 8.542s1.97-2.433 4.295-2.893l.395-1.303s.507-2.121 1.794-2.563c1.282-.443.796 2.115.796 2.115l1.663.26s1.78-2.131 3.384-1.915c0 0 .037.944-1.262 2.79 0 0 .306.356.371.937.067.58.09.819.09.819s.62.478.534.965c0 0 1.536.975 1.685 1.269 0 0 1.41-.02 1.319.5-.092.52-.17.773-.17.773s1.01 1.484-.713 1.95c0 0-.525.712-1.824.483-1.3-.23-3.29-.515-3.29-.515s-1.902-.235-2.336 1.664L8 15.788s.285.856-1.21.592c-1.493-.263-.613-.508-3.016-2.073-2.403-1.562-2.782-2.834-2.13-5.765") |
| 52 | + .attr("data-playerfill", true) |
| 53 | + .fill("#fff"); |
| 54 | + group.path("M4.74 10.16c-.901-1.532.516-3.492.516-3.492l-.477.217s-1.143 1.74-.278 3.667c.866 1.926 3.222 1.673 3.824 1.48.604-.198.921.094.921.094l.393-.332-1.216-.115c-1.263.514-2.782.013-3.683-1.519m3.022-4.423.723-.677c.071-1.159.101-2.66-.375-2.243-.475.418-.79 3.913-.79 3.913l-1.16-.64-.046.26 1.485.696zm4.624-.96s.937-.94 1.078-2.12c0 0-1.482 1.178-1.648 1.751zm-2.003 3.196c1.423.853 1.699-.705 1.699-.705-.783-1.075-1.7.705-1.7.705m2.59-.834.404.629s.207-.482-.404-.629m2.318 2.53c.22.224.804.513.76.766 0 0 .315-.093.425-.932 0 0-.28-.31-1.304-.23.002.002-.102.169.119.395m-1.328 2.449c.537.21 1.428-.056 1.428-.056.372.065.523-.138.523-.138l-.092-.782c-.23 1.3-1.86.976-1.86.976") |
| 55 | + .attr("data-playerfill2", true) |
| 56 | + .fill("#000"); |
| 57 | + group.viewbox(0, 0, 18.169, 17.871); |
| 58 | + return group; |
| 59 | +}); |
| 60 | + |
| 61 | +sheet.glyphs.set("arimaa-elephant", (canvas: SVGContainer) => { |
| 62 | + const group = canvas.symbol(); |
| 63 | + group.path("M10.407 17.607c-1.289 0-2.333-.746-4.2-2.178-.376-.129-1.237-.385-1.708-.385l-.056.002-.059.064c-.002.004-.238.27-.238.662 0 .652-.424.949-.845.949-.136 0-.241-.031-.271-.039l-.071-.021-.063-.043c-.132-.094-3.212-2.289-2.868-6.047.288-3.151 2.346-4.324 3.577-4.324q.34 0 .599.111c.322-.085.95-.234 1.43-.234.094 0 .311 0 .516.085a4 4 0 0 1 .813-.119H7c.232-.29.639-.7 1.222-.938-.545-1.203-.89-3.112.624-4.304C9.549.292 10.34 0 11.135 0c1.447 0 2.589.951 2.867 2.349.229.104.503.287.61.599.069.207.09.531-.219.905-.354.428-.629.665-.965.782.366.483.702 1.002.909 1.5.668 1.617.911 4.437-.539 5.718.474-.031 1.381-.322 2.629-1.768l.621-.721.212.93c.015.057.331 1.502-.632 2.707-.79.99-2.17 1.506-4.101 1.531-.086.063-.197.145-.301.219-.078.809-.403 2.832-1.762 2.857h-.057z") |
| 64 | + .attr("data-playerfill2", true) |
| 65 | + .fill("#000"); |
| 66 | + group.path("M3.171 16.223S.184 14.139.506 10.616C.83 7.091 3.514 6.36 4.137 6.876c0 0 1.655-.494 1.935-.15 0 0 1.096-.301 1.117-.064 0 0 .581-1.053 1.741-1.203 0 0-1.698-2.729.214-4.233 1.913-1.504 4.212-.581 4.427 1.482 0 0 .966.215.45.838s-.751.634-1.331.634c0 0-.645-.486-.56-.744.086-.258.021-.428-.214-.535-.236-.107-.623.022-.623.108 0 0 1.976 1.804 2.599 3.309s.88 4.36-.645 5.35l-.149.537s1.396.859 3.694-1.807c0 0 .838 3.654-4.426 3.654 0 0-.43.322-.602.43 0 0-.149 2.621-1.31 2.643s-2.171-.709-4.019-2.127c0 0-2.321-.814-2.406-.215 0 0-.365.387-.365.988s-.493.452-.493.452") |
| 67 | + .attr("data-playerfill", true) |
| 68 | + .fill("#fff"); |
| 69 | + group.path("M3.256 10.637c.022-1.59 1.376-2.084 1.376-2.084s.45-.236-.215-1.375l-.151.128s.495.794.237.967c0 0-2.922 1.784-.559 4.834l.021.773h.258L4.181 13s-.946-.773-.925-2.363M8.801 7.242c.321.838.623 0 .623-.408s-.173-.881-.173-.881-.624-.58-1.568.838c0 0 .796-.387 1.118.451M5.685 9.713c.107.064 1.075.473 1.097.193.02-.279-.067-.773.278-.838 0 0-.772-.989-1.332-.172-.559.817-.15.753-.043.817") |
| 70 | + .attr("data-playerfill2", true) |
| 71 | + .fill("#000"); |
| 72 | + group.path("m6.373 12.27-.343.128s-1.29.387-1.29-1.268l-.258-.064c0 .064-.216 1.525 1.332 1.568h.279") |
| 73 | + .attr("data-playerfill2", true) |
| 74 | + .fill("#000"); |
| 75 | + group.path("m9.893 14.598-.099-.002c-2.347-.082-3.226-1.336-3.477-1.814l.313-.604c.138-.145.375-.26.795-.26.273 0 .55.127.822.381.578.537 1.18.811 1.788.809 1.553-.004 2.2-1.057 2.686-1.766.066-.096.146-.162.202-.217.009.074-.066.848-.466 1.662-.332.676-1.107 1.811-2.564 1.811") |
| 76 | + .attr("data-playerfill2", true) |
| 77 | + .fill({opacity: 0.5, color: "#000"}); |
| 78 | + group.path("M9.446 15.084s.535 1.461.901 1.074.537-1.117.537-1.117-.685.365-1.438.043M7.726 9.261s1.246-1.311 1.74-1.547.56-.3.474-1.16-1.655-3.309-1.118-3.846l.216.193s-.364.129.666 2.106.428 2.707.257 2.707-1.612.966-1.977 1.676zM13.293 2.747s-.46.307-.793.307c0 0-.679-1.411-1.435-.358-.11.153-.256-.307-.256-.307s1.255-.793 1.716.486l.665-.282z") |
| 79 | + .attr("data-playerfill2", true) |
| 80 | + .fill("#000"); |
| 81 | + group.viewbox(0, 0, 17.323, 17.607); |
| 82 | + return group; |
| 83 | +}); |
| 84 | + |
| 85 | +sheet.glyphs.set("arimaa-horse", (canvas: SVGContainer) => { |
| 86 | + const group = canvas.symbol(); |
| 87 | + group.path("M6.123 15.807c-.398-.145-.705-.377-.91-.693-.403-.614-1.153-1.76-2.15-2.305l-.07-.025c-.244-.089-.89-.272-1.569-.037l-.637.219.04-.672.021-.354-.446-.276-.359-.218.195-.372c.021-.042.465-.872 1.407-1.182l-.232-1.037-.069-.306.26-.17.865-.564-.105-.175-.109-.177.065-.198c.016-.048.403-1.184 2.232-1.902l-.386-.098.25-.572c.247-.362.794-.871 1.466-.858l.221-.333c.218-.316.817-.821 1.593-.62a.9.9 0 0 1 .335-.066c.47-.62 1.476-1.78 2.381-1.674l.053.007.084.024q.371.136.419.575c.379-.156.832-.242 1.289-.076l.255.093.038.267c.02.163.056.998-1.405 1.914l-.008.034c.166.133.321.29.42.46.498.225 1.823.973 2.647 2.763.094.058.284.161.597.275l.146.051.01.004c.619.225 1.708.8 2 1.568.12.308.104.62-.045.9l-.172.336c-.346.686-.76 1.51-1.391 1.729-.027.318-.128.723-.44.967-.194.152-.537.294-1.064.102-.974-.392-2.32-.935-2.163-2.113l-.542-.318c-.746.035-1.594.254-1.698.54-.08.219-.205.491-.343.79-.268.58-.767 1.658-.615 2.014.321.756.06 1.423-.7 1.785-.344.16-1.057.194-1.66-.026") |
| 88 | + .attr("data-playerfill2", true) |
| 89 | + .fill("#000"); |
| 90 | + group.path("M3.279 12.415s-.96-.455-2.003-.093l.036-.623-.676-.416s.493-.944 1.55-1.049l-.332-1.477L3.08 7.95l-.334-.544s.345-1.063 2.19-1.706c0 0 .627-.556-.15-.753 0 0 .638-.935 1.441-.579 0 0 .82-.507.243-.61 0 0 .493-.712 1.266-.388 0 0 .24-.19.487-.057 0 0 1.28-1.824 2.133-1.725 0 0 .385-.008-.017 1.096 0 0 .918-.895 1.762-.588 0 0 .1.714-1.354 1.563l-.121.508s.564.374.582.614c0 0 1.698.577 2.636 2.72 0 0 .259.222.96.455.7.233 2.114 1.067 1.708 1.831s-.9 2.006-1.615 1.873c0 0 .161 1.48-.949 1.032s-2.113-.896-1.752-1.889l-.942-.556s-1.943.035-2.237.841c-.293.806-1.258 2.406-.95 3.133s-.172 1.06-.48 1.203c-.306.143-1.51.192-2.002-.559-.49-.75-1.245-1.873-2.307-2.451") |
| 91 | + .attr("data-playerfill", true) |
| 92 | + .fill("#fff"); |
| 93 | + group.path("M5.739 7.753c-.765-1.571 1.007-2.942 1.007-2.942-1.155.258-2.512 3.348-2.512 3.348l.219.038.87-1.571s-.46 1.785 1.826 3.082 3.484-.195 3.484-.195l-.12-.192c-1.849 1.638-4.01.004-4.774-1.568m9.148 2.629c.358.01.694-.78.128-1.203 0 0-.86-.408-.895.084-.034.49.41 1.11.767 1.119M8.81 6.368c.39.736 1.467.746 1.582.428 0 0-.515-.973-1.37-1.305 0 0-.603.141-.212.877m1.604-3.17-.242.59 1.73-1.491zM10.12 2.01c-.3-.11-1.353 1.563-1.353 1.563l.906-.22zm2.842 8.542-.2.224c.958.984 1.877.959 1.877.959l.018-.248c-.976-.143-1.695-.935-1.695-.935M2.276 11.73s1.554-3.805 2.41-5.4c0 0-2.22 3.942-2.672 5.304z") |
| 94 | + .attr("data-playerfill2", true) |
| 95 | + .fill("#000"); |
| 96 | + group.viewbox(0, 0, 17.074, 17.089); |
| 97 | + return group; |
| 98 | +}); |
| 99 | + |
| 100 | +sheet.glyphs.set("arimaa-rabbit", (canvas: SVGContainer) => { |
| 101 | + const group = canvas.symbol(); |
| 102 | + group.path("M4.092 17.618a2.77 2.77 0 0 1-1.976-.837c-.306-.312-.568-.649-.815-.964-.422-.545-.787-1.016-1.146-1.016L0 13.777c.13-.033.297-.114.335-.163-.019 0-.036-.104-.054-.229C.184 12.658 0 11.304.922 10.5c.63-.55 1.113-1.089 1.314-1.323.059-.859.361-4.62 1.265-7.587C3.822.535 4.081 0 4.597 0h.239l.232.222c.53.617.274 3.312.27 3.338-.038.253-.121.673-.232 1.223-.182.908-.45 2.223-.688 3.717.536-1.691 2.303-6.812 4.32-7.902l.4-.216.271.368c.272.376.86 2.096-2.85 8.562 1.085.673 3.375 2.256 3.403 3.621.014.632-.144 1.117-.464 1.446-.257.263-.55.352-.753.382-.295.257-.962.754-1.682.754h-.012c-.408 0-.774.13-1.147 1.044-.264.652-.959 1.059-1.812 1.059") |
| 103 | + .attr("data-playerfill2", true) |
| 104 | + .fill("#000"); |
| 105 | + group.path("M.123 14.282s.712-.17.712-.599c0-.427-.456-2.023.428-2.793s1.482-1.509 1.482-1.509.257-4.363 1.254-7.64c.998-3.278.94.998.827 1.739-.115.741-.627 2.935-1.026 5.614l.969.028s2.052-6.897 4.219-8.066c0 0 .997 1.369-3.136 8.437 0 0 3.563 2.053 3.592 3.449s-.911 1.311-.911 1.311-.771.771-1.512.741c-.741-.027-1.225.455-1.597 1.368-.369.912-1.994 1.025-2.935.057-.941-.969-1.455-2.166-2.366-2.137") |
| 106 | + .attr("data-playerfill", true) |
| 107 | + .fill("#fff"); |
| 108 | + group.path("M4.886 14.756a1.48 1.48 0 0 0-.602.951c-.171.969-2.052-1.482-2.052-1.482l-.313.086s1.453 2.023 2.194 1.823c.742-.199.058-.285.514-.855.088-.11.227-.212.393-.304.686-.372.64-.799-.134-.219m.795-3.666c-.542-.029-.713.512-.713.512s-.028.456.428.571a.88.88 0 0 0 .912-.286c.143-.171-.085-.768-.627-.797m2.423 1.482c-.171.228.313.398.313.398.343.713.542.088.542.088s.084-.315.084-.458-.768-.256-.939-.028m.255.912s-.13.522-1.251.489c-.071-.002-.096.141-.173.139 0 0 1.195-.115 1.195.028l.181.012-.03-.241.222-.342zM6.233 7.07c-1.085 1.025-.78 2.196-.78 2.196l.199.084c.683-.873.581-2.28.581-2.28") |
| 109 | + .attr("data-playerfill2", true) |
| 110 | + .fill("#000"); |
| 111 | + group.viewbox(0, 0, 9.964, 17.618); |
| 112 | + return group; |
| 113 | +}); |
| 114 | + |
| 115 | +export { sheet as ArimaaSheet }; |
0 commit comments