daviscodesbugs / gamepiece-json

A collection of json files describing the pieces of board games
GNU General Public License v3.0
12 stars 33 forks source link

Add SET definition #43

Closed schmich closed 7 years ago

schmich commented 7 years ago

I added the definition for SET, created from the manufacturer's website, the Amazon product page, the BGG entry, and my own copy.

Interestingly, every card in this game is unique. There are four attributes with three values for each attribute for a total of 34 = 81 cards.

I used the manufacturer's terminology and a script to generate all the cards to avoid errors:

require 'json'

colors = ['red', 'purple', 'green']
shadings = ['solid', 'striped', 'outlined']
symbols = ['oval', 'squiggle', 'diamond']
numbers = [1, 2, 3]

cards = colors.product(shadings, symbols, numbers).map do |c, sh, sy, n|
  { color: c, shading: sh, symbol: sy, number: n, count: 1 }
end

puts JSON.pretty_generate(cards, indent: '    ')
daviscodesbugs commented 7 years ago

One of my more favorite games. I had no idea that every card was unique.

Love the little ruby script 👍 Merging.