diff --git a/2022/05-gencant/Rules.md b/2022/05-gencant/Rules.md index 4e2e558..02f03a5 100644 --- a/2022/05-gencant/Rules.md +++ b/2022/05-gencant/Rules.md @@ -3,7 +3,7 @@ You are all mages competing to put on the flashiest magic display for the festival! Arrange the elements to put on a good show. -Take the three border cards and deal each one faceup. +Shuffle the three nexus cards, flipping some upside down during shuffling, and deal each one faceup. Place the left elements in the fixed hexes on the corners in clockwise order from the top. Place the right elements in the fixed hexes on the corners in clockwise order from the bottom. @@ -16,6 +16,7 @@ Place the elements in a hex connected to the mage by other filled hexes, in eith If either of the following elements are touching, cross them out. They have nullified each other. +For reference, these pairs are on the nexus cards. - Light and Dark - Fire and Water @@ -25,11 +26,11 @@ When all 15 mana cards have been flipped, the festival is over. See how the audience liked your display with the following rules. Do not count nullified elements. -- Light = 3 points if not touching other Light +- Light = 3 points for each cluster - Light shines brightest on its own - Dark = 3 points for each hex in the cluster after the first - Darkness tries to swallow everything -- Fire = 2 points for each adjacent Fire +- Fire = 2 points for each connection between adjacent fire hexes - Fire grows and burns - Water = 3 times length for straight line of 3 or more - Water flows like a river diff --git a/2022/05-gencant/data.csv b/2022/05-gencant/data.csv index 4bd25ae..e018ffd 100644 --- a/2022/05-gencant/data.csv +++ b/2022/05-gencant/data.csv @@ -1,19 +1,19 @@ -left,right -light,dark -light,fire -light,water -light,earth -light,air -dark,fire -dark,water -dark,earth -dark,air -fire,water -fire,earth -fire,air -water,earth -water,air -earth,air -light,dark -fire,water -earth,air \ No newline at end of file +title,left,right +mana,light,dark +mana,light,fire +mana,light,water +mana,light,earth +mana,light,air +mana,dark,fire +mana,dark,water +mana,dark,earth +mana,dark,air +mana,fire,water +mana,fire,earth +mana,fire,air +mana,water,earth +mana,water,air +mana,earth,air +nexus,light,dark +nexus,fire,water +nexus,earth,air \ No newline at end of file diff --git a/2022/05-gencant/deck.rb b/2022/05-gencant/deck.rb index 43d4be9..588e129 100644 --- a/2022/05-gencant/deck.rb +++ b/2022/05-gencant/deck.rb @@ -1,5 +1,14 @@ require 'squib' +element_descs = { + "light" => "3 per cluster", + "dark" => "3 each after first in clusters", + "fire" => "2 points per connected pair", + "water" => "3 times length for straight line of 3+", + "earth" => "4 per triangle cluster", + "air" => "3 points for each curve in line" +} + Squib::Deck.new(cards: 18, layout: 'layout.yml', width: '3.5in', height: '2.5in') do data = csv file: 'data.csv' @@ -11,9 +20,11 @@ Squib::Deck.new(cards: 18, layout: 'layout.yml', width: '3.5in', height: '2.5in' text layout: :title, str: 'Border', align: :center, range: (15..17) svg layout: :leftSymbol, width: 200, file: data.left.map { |elem| "images/#{elem}.svg" } - text layout: :leftText, str: data.left, align: :center, ellipsize: :autoscale + text layout: :leftText, str: data.left + text layout: :leftDescription, str: data.left.map { |elem| element_descs[elem] } svg layout: :rightSymbol, width: 200, file: data.right.map { |elem| "images/#{elem}.svg" } - text layout: :rightText, str: data.right, align: :center, ellipsize: :autoscale + text layout: :rightText, str: data.right + text layout: :rightDescription, str: data.right.map { |elem| element_descs[elem] } save format: :png, prefix: 'card_' save_pdf trim: 37.5, file: 'pnp.pdf' @@ -29,7 +40,8 @@ Squib::Deck.new(cards: 6, width: '3in', height: '4in') do rect x: inches(0.5) + i * inches(2.0/7.0), y: '3.0in', width: '0.25in', height: '0.25in' rect x: inches(0.5) + i * inches(2.0/7.0), y: '3.25in', width: '0.25in', height: '0.25in' end - star x: inches(0.5) + 6 * inches(2.0/7.0) + inches(0.125), y: '3.125in', outer_radius: '0.125in', inner_radius: inches(1.0/16.0), angle: '270deg' + star x: inches(0.5) + 6 * inches(2.0/7.0) + inches(0.125), y: '3.125in', + outer_radius: '0.125in', inner_radius: inches(1.0/16.0), angle: '270deg' save_pdf trim: 37.5, file: 'player.pdf' end \ No newline at end of file diff --git a/2022/05-gencant/layout.yml b/2022/05-gencant/layout.yml index bf1e7bd..c1dca59 100644 --- a/2022/05-gencant/layout.yml +++ b/2022/05-gencant/layout.yml @@ -6,27 +6,43 @@ title: leftSymbol: x: 200 - y: 300 + y: 200 width: 200 height: 200 leftText: x: 200 - y: 500 + y: 400 width: 200 height: 60 + align: center + ellipsize: autoscale + +leftDescription: + extends: leftText + y: += 100 + align: center + ellipsize: autoscale rightSymbol: x: 600 - y: 300 + y: 200 width: 200 height: 200 rightText: x: 600 - y: 500 + y: 400 width: 200 height: 60 + align: center + ellipsize: autoscale + +rightDescription: + extends: rightText + y: += 100 + align: center + ellipsize: autoscale # The "cut line", without rounded corners cut: