Skip to content

Instantly share code, notes, and snippets.

@jrsconfitto
Last active August 29, 2015 13:58
Show Gist options
  • Save jrsconfitto/9992169 to your computer and use it in GitHub Desktop.
Save jrsconfitto/9992169 to your computer and use it in GitHub Desktop.
7 Wonders base block
node_modules

7 Wonders stats play

This one will use a data file instead of loading stuff from tabletop. i'm hoping this will let me play quicker.

[
{
"date": "2014-01-26T05:00:00.000Z",
"gameNumber": 1,
"location": "67 Alliance Ave",
"players": [
{
"name": "Jesse",
"wonder": "Olympia",
"side": "B",
"scores": {
"military": 16,
"coindebt": 1,
"wonder": 5,
"civic": 9,
"trade": 0,
"guilds": 7,
"science": 9,
"leaders": 0
},
"total": 47
},
{
"name": "Matt",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": -6,
"coindebt": 4,
"wonder": 3,
"civic": 0,
"trade": 4,
"guilds": 12,
"science": 36,
"leaders": 4
},
"total": 57
},
{
"name": "Tyler",
"wonder": "Abu Simbel",
"side": "B",
"scores": {
"military": 8,
"coindebt": 3,
"wonder": 5,
"civic": 12,
"trade": 0,
"guilds": 18,
"science": 2,
"leaders": 14
},
"total": 62
},
{
"name": "Jamie",
"wonder": "Stonehenge",
"side": "B",
"scores": {
"military": 6,
"coindebt": 5,
"wonder": 5,
"civic": 18,
"trade": 9,
"guilds": 0,
"science": 0,
"leaders": 8
},
"total": 51
}
],
"totalPoints": 217,
"cities": false,
"winners": [
{
"name": "Tyler",
"wonder": "Abu Simbel",
"score": 62
}
]
},
{
"date": "2014-02-23T05:00:00.000Z",
"gameNumber": "-2",
"location": "67 Alliance Ave",
"players": [
{
"name": "Tyler",
"wonder": "Stonehenge",
"side": "B",
"scores": {
"military": 6,
"coindebt": 10,
"wonder": 11,
"civic": 6,
"trade": 0,
"guilds": 18,
"science": 1,
"leaders": 4
},
"total": 56
},
{
"name": "Joel",
"wonder": "Rhodes",
"side": "B",
"scores": {
"military": 6,
"coindebt": 9,
"wonder": 7,
"civic": 11,
"trade": 9,
"guilds": 15,
"science": 1,
"leaders": 7
},
"total": 65
},
{
"name": "Jamie",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 6,
"coindebt": 0,
"wonder": 10,
"civic": 24,
"trade": 0,
"guilds": 0,
"science": 16,
"leaders": 9
},
"total": 65
}
],
"totalPoints": 186,
"cities": false,
"winners": [
{
"name": "Joel",
"wonder": "Rhodes",
"score": 65
},
{
"name": "Jamie",
"wonder": "Ephesus",
"score": 65
}
]
},
{
"date": "2014-02-23T05:00:00.000Z",
"gameNumber": "-1",
"location": "67 Alliance Ave",
"players": [
{
"name": "Tyler",
"wonder": "Rome",
"side": "B",
"scores": {
"military": 8,
"coindebt": 1,
"wonder": 6,
"civic": 10,
"trade": 0,
"guilds": 1,
"science": 10,
"leaders": 24
},
"total": 60
},
{
"name": "Joel",
"wonder": "Giza",
"side": "B",
"scores": {
"military": -5,
"coindebt": 3,
"wonder": 13,
"civic": 16,
"trade": 0,
"guilds": 0,
"science": 38,
"leaders": 0
},
"total": 65
},
{
"name": "Jamie",
"wonder": "Manneken Pis",
"side": "B",
"scores": {
"military": 12,
"coindebt": 4,
"wonder": 7,
"civic": 23,
"trade": 0,
"guilds": 8,
"science": 2,
"leaders": 4
},
"total": 60
}
],
"totalPoints": 185,
"cities": false,
"winners": [
{
"name": "Joel",
"wonder": "Giza",
"score": 65
}
]
},
{
"date": "2012-10-09T04:00:00.000Z",
"gameNumber": 1,
"location": "",
"players": [
{
"name": "Mike H",
"wonder": "Ephesus",
"side": "A",
"scores": {
"military": 2,
"coindebt": 8,
"wonder": 10,
"civic": 14,
"trade": 0,
"guilds": 1,
"science": 0,
"leaders": 0
},
"total": 35
},
{
"name": "Moses",
"wonder": "Giza",
"side": "A",
"scores": {
"military": 6,
"coindebt": 0,
"wonder": 15,
"civic": 9,
"trade": 0,
"guilds": 0,
"science": 13,
"leaders": 0
},
"total": 43
},
{
"name": "Brenden",
"wonder": "Olympia",
"side": "A",
"scores": {
"military": 12,
"coindebt": 4,
"wonder": 10,
"civic": 17,
"trade": 3,
"guilds": 10,
"science": 1,
"leaders": 0
},
"total": 57
},
{
"name": "John",
"wonder": "Alexandria",
"side": "A",
"scores": {
"military": -6,
"coindebt": 2,
"wonder": 10,
"civic": 14,
"trade": 0,
"guilds": 7,
"science": 26,
"leaders": 0
},
"total": 53
},
{
"name": "Jamie",
"wonder": "Rhodes",
"side": "A",
"scores": {
"military": 16,
"coindebt": 10,
"wonder": 10,
"civic": 14,
"trade": 8,
"guilds": 10,
"science": 0,
"leaders": 0
},
"total": 68
}
],
"totalPoints": 256,
"cities": false,
"winners": [
{
"name": "Jamie",
"wonder": "Rhodes",
"score": 68
}
]
},
{
"date": "2012-06-04T04:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Tyler",
"wonder": "Rome",
"side": "B",
"scores": {
"military": 2,
"coindebt": 1,
"wonder": 6,
"civic": 12,
"trade": 0,
"guilds": 20,
"science": 4,
"leaders": 17
},
"total": 62
},
{
"name": "Dan",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 11,
"coindebt": 11,
"wonder": 10,
"civic": 14,
"trade": 6,
"guilds": 0,
"science": 0,
"leaders": 5
},
"total": 57
},
{
"name": "Jayce",
"wonder": "Rhodes",
"side": "B",
"scores": {
"military": 12,
"coindebt": 1,
"wonder": 7,
"civic": 12,
"trade": 2,
"guilds": 0,
"science": 13,
"leaders": 6
},
"total": 53
},
{
"name": "Jamie",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": -1,
"coindebt": 5,
"wonder": 7,
"civic": 20,
"trade": 0,
"guilds": 0,
"science": 25,
"leaders": 4
},
"total": 60
}
],
"totalPoints": 232,
"cities": false,
"winners": [
{
"name": "Tyler",
"wonder": "Rome",
"score": 62
}
]
},
{
"date": "2012-07-01T04:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Jayce",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": 5,
"coindebt": 4,
"wonder": 7,
"civic": 8,
"trade": 0,
"guilds": 0,
"science": 25,
"leaders": 4
},
"total": 53
},
{
"name": "Tyler",
"wonder": "Rhodes",
"side": "B",
"scores": {
"military": 10,
"coindebt": 4,
"wonder": 0,
"civic": 10,
"trade": 4,
"guilds": 14,
"science": 9,
"leaders": 14
},
"total": 65
},
{
"name": "Michelle",
"wonder": "Rome",
"side": "B",
"scores": {
"military": -6,
"coindebt": 4,
"wonder": 6,
"civic": 2,
"trade": 9,
"guilds": 10,
"science": 33,
"leaders": 6
},
"total": 64
},
{
"name": "Jamie",
"wonder": "Halikanarsis",
"side": "B",
"scores": {
"military": 11,
"coindebt": 4,
"wonder": 3,
"civic": 26,
"trade": 0,
"guilds": 6,
"science": 2,
"leaders": 6
},
"total": 58
}
],
"totalPoints": 240,
"cities": false,
"winners": [
{
"name": "Tyler",
"wonder": "Rhodes",
"score": 65
}
]
},
{
"date": "2014-04-06T04:00:00.000Z",
"gameNumber": 1,
"location": "Le Desastre",
"players": [
{
"name": "Jordan",
"wonder": "Giza",
"side": "B",
"scores": {
"military": -3,
"coindebt": 0,
"wonder": 20,
"civic": 0,
"trade": 11,
"guilds": 12,
"science": 0,
"leaders": 0
},
"total": 40
},
{
"name": "Becca",
"wonder": "Petra",
"side": "A",
"scores": {
"military": -4,
"coindebt": 0,
"wonder": 10,
"civic": 25,
"trade": 0,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 0
},
{
"name": "Jamie",
"wonder": "Rome",
"side": "A",
"scores": {
"military": 16,
"coindebt": 0,
"wonder": 10,
"civic": 10,
"trade": 2,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 0
},
{
"name": "Katie",
"wonder": "Ephesus",
"side": "A",
"scores": {
"military": 11,
"coindebt": 0,
"wonder": 10,
"civic": 10,
"trade": 0,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 0
},
{
"name": "Corinne",
"wonder": "Halikanarsis",
"side": "A",
"scores": {
"military": -3,
"coindebt": 0,
"wonder": 3,
"civic": 10,
"trade": 0,
"guilds": 6,
"science": 0,
"leaders": 0
},
"total": 0
},
{
"name": "Ross",
"wonder": "Olympia",
"side": "A",
"scores": {
"military": 16,
"coindebt": 0,
"wonder": 10,
"civic": 21,
"trade": 0,
"guilds": 3,
"science": 0,
"leaders": 0
},
"total": 0
},
{
"name": "Michelle",
"wonder": "Babylon ",
"side": "B",
"scores": {
"military": -4,
"coindebt": 0,
"wonder": 3,
"civic": 0,
"trade": 0,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 0
},
{
"name": "Tyler",
"wonder": "",
"side": "",
"scores": {
"military": 11,
"coindebt": 0,
"wonder": 7,
"civic": 15,
"trade": 0,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 0
}
],
"totalPoints": 40,
"cities": false,
"winners": [
{
"name": "Jordan",
"wonder": "Giza",
"score": 40
}
]
},
{
"date": "2014-03-23T04:00:00.000Z",
"gameNumber": "-1",
"location": "Le Desastre",
"players": [
{
"name": "Tyler",
"wonder": "Halikanarsis",
"side": "B",
"scores": {
"military": 10,
"coindebt": -2,
"wonder": 3,
"civic": 17,
"trade": 0,
"guilds": 0,
"science": 26,
"leaders": 12
},
"total": 66
},
{
"name": "Michelle",
"wonder": "Ephesus",
"side": "A",
"scores": {
"military": -2,
"coindebt": 3,
"wonder": 10,
"civic": 23,
"trade": 3,
"guilds": 14,
"science": 0,
"leaders": 19
},
"total": 70
},
{
"name": "Jordan",
"wonder": "Petra",
"side": "B",
"scores": {
"military": 7,
"coindebt": 2,
"wonder": 17,
"civic": 12,
"trade": 4,
"guilds": 0,
"science": 0,
"leaders": 11
},
"total": 53
},
{
"name": "Jamie",
"wonder": "Babylon",
"side": "A",
"scores": {
"military": 1,
"coindebt": 2,
"wonder": 10,
"civic": 2,
"trade": 0,
"guilds": 0,
"science": 26,
"leaders": 16
},
"total": 57
}
],
"totalPoints": 246,
"cities": false,
"winners": [
{
"name": "Michelle",
"wonder": "Ephesus",
"score": 70
}
]
},
{
"date": "2012-05-04T04:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Steph",
"wonder": "Ephesus",
"side": "A",
"scores": {
"military": 0,
"coindebt": 5,
"wonder": 10,
"civic": 15,
"trade": 3,
"guilds": 6,
"science": 1,
"leaders": 0
},
"total": 40
},
{
"name": "Dan",
"wonder": "Alexandria",
"side": "A",
"scores": {
"military": 18,
"coindebt": 4,
"wonder": 10,
"civic": 14,
"trade": 6,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 52
},
{
"name": "Jamie",
"wonder": "Olympia",
"side": "A",
"scores": {
"military": 0,
"coindebt": 2,
"wonder": 10,
"civic": 13,
"trade": 0,
"guilds": 0,
"science": 25,
"leaders": 0
},
"total": 50
}
],
"totalPoints": 142,
"cities": false,
"winners": [
{
"name": "Dan",
"wonder": "Alexandria",
"score": 52
}
]
},
{
"date": "2014-03-16T04:00:00.000Z",
"gameNumber": 1,
"location": "Le Desastre",
"players": [
{
"name": "Michelle",
"wonder": "Petra",
"side": "B",
"scores": {
"military": 5,
"coindebt": 1,
"wonder": 17,
"civic": 11,
"trade": 0,
"guilds": 18,
"science": 0,
"leaders": 0
},
"total": 52
},
{
"name": "Jordan",
"wonder": "Olympia",
"side": "B",
"scores": {
"military": 5,
"coindebt": 4,
"wonder": 5,
"civic": 28,
"trade": 4,
"guilds": 1,
"science": 9,
"leaders": 4
},
"total": 60
},
{
"name": "Scott",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": -4,
"coindebt": 1,
"wonder": 3,
"civic": 10,
"trade": 4,
"guilds": 13,
"science": 9,
"leaders": 22
},
"total": 58
},
{
"name": "Tyler",
"wonder": "Rhodos",
"side": "B",
"scores": {
"military": 18,
"coindebt": 6,
"wonder": 10,
"civic": 0,
"trade": 3,
"guilds": 0,
"science": 19,
"leaders": 15
},
"total": 71
}
],
"totalPoints": 241,
"cities": false,
"winners": [
{
"name": "Tyler",
"wonder": "Rhodos",
"score": 71
}
]
},
{
"date": "2014-03-23T04:00:00.000Z",
"gameNumber": "-2",
"location": "Le Desastre",
"players": [
{
"name": "Michelle",
"wonder": "Byzantium",
"side": "A",
"scores": {
"military": -4,
"coindebt": 7,
"wonder": 12,
"civic": 6,
"trade": 6,
"guilds": 7,
"science": 16,
"leaders": 10
},
"total": 60
},
{
"name": "Jordan",
"wonder": "Roma",
"side": "A",
"scores": {
"military": 11,
"coindebt": 0,
"wonder": 10,
"civic": 5,
"trade": 5,
"guilds": 0,
"science": 13,
"leaders": 10
},
"total": 54
},
{
"name": "Jamie",
"wonder": "The Great Wall",
"side": "A",
"scores": {
"military": -3,
"coindebt": 2,
"wonder": 0,
"civic": 32,
"trade": 0,
"guilds": 8,
"science": 10,
"leaders": 0
},
"total": 49
},
{
"name": "Tyler",
"wonder": "Stonehenge",
"side": "B",
"scores": {
"military": 7,
"coindebt": 7,
"wonder": 7,
"civic": 12,
"trade": 0,
"guilds": 6,
"science": 0,
"leaders": 22
},
"total": 61
}
],
"totalPoints": 224,
"cities": false,
"winners": [
{
"name": "Tyler",
"wonder": "Stonehenge",
"score": 61
}
]
},
{
"date": "2012-07-19T04:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Michelle",
"wonder": "Rhodes",
"side": "B",
"scores": {
"military": 18,
"coindebt": 8,
"wonder": 7,
"civic": 0,
"trade": 5,
"guilds": 0,
"science": 13,
"leaders": 6
},
"total": 57
},
{
"name": "Dan",
"wonder": "Giza",
"side": "B",
"scores": {
"military": 2,
"coindebt": 0,
"wonder": 20,
"civic": 0,
"trade": 0,
"guilds": 7,
"science": 17,
"leaders": 0
},
"total": 46
},
{
"name": "Joel",
"wonder": "Halikanarsis",
"side": "B",
"scores": {
"military": 7,
"coindebt": 8,
"wonder": 3,
"civic": 31,
"trade": 4,
"guilds": 8,
"science": 1,
"leaders": 2
},
"total": 64
},
{
"name": "Tyler",
"wonder": "Rome",
"side": "B",
"scores": {
"military": 0,
"coindebt": 0,
"wonder": 6,
"civic": 12,
"trade": 0,
"guilds": 8,
"science": 16,
"leaders": 8
},
"total": 50
},
{
"name": "Jamie",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 3,
"coindebt": 12,
"wonder": 10,
"civic": 24,
"trade": 12,
"guilds": 12,
"science": 0,
"leaders": 6
},
"total": 79
}
],
"totalPoints": 296,
"cities": false,
"winners": [
{
"name": "Jamie",
"wonder": "Ephesus",
"score": 79
}
]
},
{
"date": "2012-04-29T04:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Tim",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 10,
"coindebt": 13,
"wonder": 10,
"civic": 0,
"trade": 7,
"guilds": 0,
"science": 16,
"leaders": 0
},
"total": 56
},
{
"name": "Tyler",
"wonder": "Olympia",
"side": "B",
"scores": {
"military": -2,
"coindebt": 0,
"wonder": 5,
"civic": 25,
"trade": 0,
"guilds": 13,
"science": 16,
"leaders": 0
},
"total": 57
},
{
"name": "Jayce",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": 4,
"coindebt": 1,
"wonder": 3,
"civic": 3,
"trade": 7,
"guilds": 4,
"science": 25,
"leaders": 0
},
"total": 47
},
{
"name": "Jamie",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": 12,
"coindebt": 4,
"wonder": 7,
"civic": 27,
"trade": 0,
"guilds": 9,
"science": 1,
"leaders": 0
},
"total": 60
}
],
"totalPoints": 220,
"cities": false,
"winners": [
{
"name": "Jamie",
"wonder": "Alexandria",
"score": 60
}
]
},
{
"date": "2012-04-07T04:00:00.000Z",
"gameNumber": "-2",
"location": "96 Alexander",
"players": [
{
"name": "Mark",
"wonder": "Alexandria",
"side": "A",
"scores": {
"military": 16,
"coindebt": 2,
"wonder": 3,
"civic": 26,
"trade": 0,
"guilds": 4,
"science": 4,
"leaders": 0
},
"total": 55
},
{
"name": "Jayce",
"wonder": "Olympia",
"side": "A",
"scores": {
"military": 1,
"coindebt": 6,
"wonder": 10,
"civic": 18,
"trade": 0,
"guilds": 12,
"science": 0,
"leaders": 0
},
"total": 47
},
{
"name": "Michelle",
"wonder": "Babylon",
"side": "A",
"scores": {
"military": 12,
"coindebt": 6,
"wonder": 10,
"civic": 3,
"trade": 2,
"guilds": 8,
"science": 13,
"leaders": 0
},
"total": 54
},
{
"name": "Tyler",
"wonder": "Halikanarsis",
"side": "A",
"scores": {
"military": -5,
"coindebt": 1,
"wonder": 10,
"civic": 16,
"trade": 0,
"guilds": 0,
"science": 18,
"leaders": 0
},
"total": 40
}
],
"totalPoints": 196,
"cities": false,
"winners": [
{
"name": "Mark",
"wonder": "Alexandria",
"score": 55
}
]
},
{
"date": "2012-03-17T04:00:00.000Z",
"gameNumber": "-2",
"location": "96 Alexander",
"players": [
{
"name": "Michelle",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": 10,
"coindebt": 7,
"wonder": 3,
"civic": 5,
"trade": 3,
"guilds": 0,
"science": 31,
"leaders": 0
},
"total": 59
},
{
"name": "Jamie",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": -2,
"coindebt": 8,
"wonder": 10,
"civic": 14,
"trade": 4,
"guilds": 0,
"science": 13,
"leaders": 0
},
"total": 47
},
{
"name": "Tyler",
"wonder": "Halikanarsis",
"side": "B",
"scores": {
"military": -2,
"coindebt": 3,
"wonder": 3,
"civic": 31,
"trade": 3,
"guilds": 6,
"science": 0,
"leaders": 0
},
"total": 44
},
{
"name": "Jayce",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": 11,
"coindebt": 5,
"wonder": 7,
"civic": 13,
"trade": 3,
"guilds": 13,
"science": 0,
"leaders": 0
},
"total": 52
}
],
"totalPoints": 202,
"cities": false,
"winners": [
{
"name": "Michelle",
"wonder": "Babylon",
"score": 59
}
]
},
{
"date": "2012-04-07T04:00:00.000Z",
"gameNumber": "-1",
"location": "96 Alexander",
"players": [
{
"name": "Mark",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": 18,
"coindebt": 2,
"wonder": 7,
"civic": 11,
"trade": 3,
"guilds": 10,
"science": 10,
"leaders": 0
},
"total": 61
},
{
"name": "Dan",
"wonder": "Halikanarsis",
"side": "B",
"scores": {
"military": -6,
"coindebt": 2,
"wonder": 3,
"civic": 30,
"trade": 4,
"guilds": 9,
"science": 4,
"leaders": 0
},
"total": 46
},
{
"name": "Jayce",
"wonder": "Olympus",
"side": "B",
"scores": {
"military": 16,
"coindebt": 2,
"wonder": 5,
"civic": 14,
"trade": 3,
"guilds": 25,
"science": 0,
"leaders": 0
},
"total": 65
},
{
"name": "Michelle",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": 8,
"coindebt": 3,
"wonder": 3,
"civic": 0,
"trade": 2,
"guilds": 7,
"science": 26,
"leaders": 0
},
"total": 49
},
{
"name": "Tyler",
"wonder": "Giza",
"side": "B",
"scores": {
"military": -6,
"coindebt": 5,
"wonder": 13,
"civic": 18,
"trade": 0,
"guilds": 5,
"science": 16,
"leaders": 0
},
"total": 51
}
],
"totalPoints": 272,
"cities": false,
"winners": [
{
"name": "Jayce",
"wonder": "Olympus",
"score": 65
}
]
},
{
"date": "2012-03-11T05:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Jayce",
"wonder": "Halikanarsis",
"side": "A",
"scores": {
"military": 9,
"coindebt": 3,
"wonder": 10,
"civic": 18,
"trade": 6,
"guilds": 7,
"science": 0,
"leaders": 0
},
"total": 53
},
{
"name": "Tyler",
"wonder": "Olympia",
"side": "A",
"scores": {
"military": -1,
"coindebt": 3,
"wonder": 10,
"civic": 22,
"trade": 0,
"guilds": 8,
"science": 18,
"leaders": 0
},
"total": 60
},
{
"name": "Michelle",
"wonder": "Giza",
"side": "A",
"scores": {
"military": -3,
"coindebt": 7,
"wonder": 15,
"civic": 11,
"trade": 4,
"guilds": 9,
"science": 9,
"leaders": 0
},
"total": 52
},
{
"name": "Dan",
"wonder": "Rhodes",
"side": "A",
"scores": {
"military": 18,
"coindebt": 2,
"wonder": 3,
"civic": 16,
"trade": 0,
"guilds": 9,
"science": 2,
"leaders": 0
},
"total": 50
},
{
"name": "Mya",
"wonder": "Ephesus",
"side": "A",
"scores": {
"military": 1,
"coindebt": 4,
"wonder": 10,
"civic": 17,
"trade": 5,
"guilds": 8,
"science": 0,
"leaders": 0
},
"total": 45
},
{
"name": "Jamie",
"wonder": "Alexandria",
"side": "A",
"scores": {
"military": 4,
"coindebt": 2,
"wonder": 10,
"civic": 2,
"trade": 3,
"guilds": 0,
"science": 25,
"leaders": 0
},
"total": 46
}
],
"totalPoints": 306,
"cities": false,
"winners": [
{
"name": "Tyler",
"wonder": "Olympia",
"score": 60
}
]
},
{
"date": "2012-03-17T04:00:00.000Z",
"gameNumber": "-1",
"location": "96 Alexander",
"players": [
{
"name": "Jamie",
"wonder": "Giza",
"side": "B",
"scores": {
"military": 6,
"coindebt": 6,
"wonder": 20,
"civic": 16,
"trade": 5,
"guilds": 9,
"science": 0,
"leaders": 0
},
"total": 62
},
{
"name": "Tyler",
"wonder": "Rhodes",
"side": "B",
"scores": {
"military": 6,
"coindebt": 1,
"wonder": 7,
"civic": 12,
"trade": 0,
"guilds": 0,
"science": 18,
"leaders": 0
},
"total": 44
},
{
"name": "Jayce",
"wonder": "Olympus",
"side": "B",
"scores": {
"military": 16,
"coindebt": 4,
"wonder": 5,
"civic": 10,
"trade": 2,
"guilds": 2,
"science": 0,
"leaders": 0
},
"total": 39
},
{
"name": "Michelle",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": -4,
"coindebt": 4,
"wonder": 7,
"civic": 8,
"trade": 1,
"guilds": 7,
"science": 18,
"leaders": 0
},
"total": 41
}
],
"totalPoints": 186,
"cities": false,
"winners": [
{
"name": "Jamie",
"wonder": "Giza",
"score": 62
}
]
},
{
"date": "2012-02-05T05:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Jayce",
"wonder": "",
"side": "",
"scores": {
"military": 12,
"coindebt": 2,
"wonder": 5,
"civic": 17,
"trade": 0,
"guilds": 17,
"science": 0,
"leaders": 0
},
"total": 53
},
{
"name": "Joel",
"wonder": "",
"side": "",
"scores": {
"military": 2,
"coindebt": 5,
"wonder": 3,
"civic": 28,
"trade": 7,
"guilds": 7,
"science": 0,
"leaders": 0
},
"total": 52
},
{
"name": "Tyler",
"wonder": "",
"side": "",
"scores": {
"military": -6,
"coindebt": 10,
"wonder": 10,
"civic": 9,
"trade": 10,
"guilds": 0,
"science": 18,
"leaders": 0
},
"total": 51
},
{
"name": "Shane",
"wonder": "",
"side": "",
"scores": {
"military": 12,
"coindebt": 1,
"wonder": 3,
"civic": 3,
"trade": 0,
"guilds": 17,
"science": 16,
"leaders": 0
},
"total": 52
},
{
"name": "Jamie",
"wonder": "",
"side": "",
"scores": {
"military": 6,
"coindebt": 4,
"wonder": 7,
"civic": 14,
"trade": 0,
"guilds": 0,
"science": 16,
"leaders": 0
},
"total": 47
}
],
"totalPoints": 255,
"cities": false,
"winners": [
{
"name": "Jayce",
"wonder": "",
"score": 53
}
]
},
{
"date": "2012-01-20T05:00:00.000Z",
"gameNumber": "-2",
"location": "96 Alexander",
"players": [
{
"name": "Jayce",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 16,
"coindebt": 3,
"wonder": 2,
"civic": 12,
"trade": 0,
"guilds": 0,
"science": 26,
"leaders": 0
},
"total": 59
},
{
"name": "Joel",
"wonder": "Giza",
"side": "B",
"scores": {
"military": -1,
"coindebt": 8,
"wonder": 20,
"civic": 17,
"trade": 8,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 52
},
{
"name": "Shane",
"wonder": "Olympia",
"side": "B",
"scores": {
"military": 7,
"coindebt": 2,
"wonder": 5,
"civic": 5,
"trade": 2,
"guilds": 7,
"science": 9,
"leaders": 0
},
"total": 37
},
{
"name": "Seth",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": 7,
"coindebt": 11,
"wonder": 3,
"civic": 19,
"trade": 7,
"guilds": 0,
"science": 1,
"leaders": 0
},
"total": 48
},
{
"name": "Jamie",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": -3,
"coindebt": 0,
"wonder": 7,
"civic": 7,
"trade": 0,
"guilds": 6,
"science": 7,
"leaders": 0
},
"total": 24
}
],
"totalPoints": 220,
"cities": false,
"winners": [
{
"name": "Jayce",
"wonder": "Ephesus",
"score": 59
}
]
},
{
"date": "2012-01-20T05:00:00.000Z",
"gameNumber": "-1",
"location": "96 Alexander",
"players": [
{
"name": "Seth",
"wonder": "",
"side": "A",
"scores": {
"military": 7,
"coindebt": 2,
"wonder": 10,
"civic": 20,
"trade": 3,
"guilds": 1,
"science": 6,
"leaders": 0
},
"total": 49
},
{
"name": "Jennie",
"wonder": "",
"side": "A",
"scores": {
"military": 5,
"coindebt": 10,
"wonder": 3,
"civic": 29,
"trade": 7,
"guilds": 1,
"science": 0,
"leaders": 0
},
"total": 55
},
{
"name": "Shane",
"wonder": "",
"side": "A",
"scores": {
"military": 4,
"coindebt": 1,
"wonder": 3,
"civic": 29,
"trade": 0,
"guilds": 4,
"science": 0,
"leaders": 0
},
"total": 41
},
{
"name": "Joel",
"wonder": "",
"side": "A",
"scores": {
"military": -2,
"coindebt": 5,
"wonder": 10,
"civic": 0,
"trade": 0,
"guilds": 21,
"science": 0,
"leaders": 0
},
"total": 34
},
{
"name": "Autumn",
"wonder": "",
"side": "A",
"scores": {
"military": 8,
"coindebt": 1,
"wonder": 10,
"civic": 0,
"trade": 0,
"guilds": 18,
"science": 13,
"leaders": 0
},
"total": 50
},
{
"name": "Kristina",
"wonder": "",
"side": "A",
"scores": {
"military": 14,
"coindebt": 3,
"wonder": 3,
"civic": 8,
"trade": 1,
"guilds": 1,
"science": 4,
"leaders": 0
},
"total": 34
},
{
"name": "Jamie",
"wonder": "",
"side": "A",
"scores": {
"military": -2,
"coindebt": 5,
"wonder": 10,
"civic": 6,
"trade": 6,
"guilds": 13,
"science": 14,
"leaders": 0
},
"total": 52
}
],
"totalPoints": 315,
"cities": false,
"winners": [
{
"name": "Jennie",
"wonder": "",
"score": 55
}
]
},
{
"date": "2012-01-13T05:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Joel",
"wonder": "",
"side": "A",
"scores": {
"military": 15,
"coindebt": 4,
"wonder": 10,
"civic": 22,
"trade": 4,
"guilds": 0,
"science": 4,
"leaders": 0
},
"total": 59
},
{
"name": "Shane",
"wonder": "",
"side": "A",
"scores": {
"military": -2,
"coindebt": 2,
"wonder": 10,
"civic": 9,
"trade": 2,
"guilds": 9,
"science": 1,
"leaders": 0
},
"total": 31
},
{
"name": "Seth",
"wonder": "",
"side": "A",
"scores": {
"military": 14,
"coindebt": 2,
"wonder": 10,
"civic": 11,
"trade": 0,
"guilds": 0,
"science": 4,
"leaders": 0
},
"total": 41
},
{
"name": "Jamie",
"wonder": "",
"side": "A",
"scores": {
"military": -3,
"coindebt": 0,
"wonder": 15,
"civic": 2,
"trade": 0,
"guilds": 7,
"science": 16,
"leaders": 0
},
"total": 37
}
],
"totalPoints": 168,
"cities": false,
"winners": [
{
"name": "Joel",
"wonder": "",
"score": 59
}
]
},
{
"date": "2012-01-08T05:00:00.000Z",
"gameNumber": "-1",
"location": "96 Alexander",
"players": [
{
"name": "Pat",
"wonder": "",
"side": "A",
"scores": {
"military": 6,
"coindebt": 8,
"wonder": 10,
"civic": 14,
"trade": 8,
"guilds": 0,
"science": 1,
"leaders": 0
},
"total": 47
},
{
"name": "Scott",
"wonder": "",
"side": "A",
"scores": {
"military": 4,
"coindebt": 5,
"wonder": 3,
"civic": 18,
"trade": 3,
"guilds": 12,
"science": 1,
"leaders": 0
},
"total": 46
},
{
"name": "Jamie",
"wonder": "",
"side": "A",
"scores": {
"military": 10,
"coindebt": 5,
"wonder": 10,
"civic": 0,
"trade": 4,
"guilds": 16,
"science": 10,
"leaders": 0
},
"total": 55
},
{
"name": "Tyler",
"wonder": "",
"side": "A",
"scores": {
"military": 4,
"coindebt": 1,
"wonder": 10,
"civic": 14,
"trade": 0,
"guilds": 0,
"science": 25,
"leaders": 0
},
"total": 54
}
],
"totalPoints": 202,
"cities": false,
"winners": [
{
"name": "Jamie",
"wonder": "",
"score": 55
}
]
},
{
"date": "2012-12-26T05:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Jayce",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 16,
"coindebt": 3,
"wonder": 2,
"civic": 12,
"trade": 0,
"guilds": 26,
"science": 0,
"leaders": 0
},
"total": 59
},
{
"name": "Joel",
"wonder": "Giza",
"side": "B",
"scores": {
"military": -1,
"coindebt": 8,
"wonder": 20,
"civic": 17,
"trade": 8,
"guilds": 0,
"science": 0,
"leaders": 0
},
"total": 52
},
{
"name": "Shane",
"wonder": "Olympia",
"side": "B",
"scores": {
"military": 7,
"coindebt": 2,
"wonder": 5,
"civic": 5,
"trade": 2,
"guilds": 9,
"science": 7,
"leaders": 0
},
"total": 37
},
{
"name": "Seth",
"wonder": "Babylon",
"side": "B",
"scores": {
"military": 7,
"coindebt": 11,
"wonder": 3,
"civic": 19,
"trade": 7,
"guilds": 1,
"science": 0,
"leaders": 0
},
"total": 48
},
{
"name": "Jamie",
"wonder": "Alexandria",
"side": "B",
"scores": {
"military": -3,
"coindebt": 0,
"wonder": 7,
"civic": 7,
"trade": 0,
"guilds": 7,
"science": 6,
"leaders": 0
},
"total": 24
}
],
"totalPoints": 220,
"cities": false,
"winners": [
{
"name": "Jayce",
"wonder": "Ephesus",
"score": 59
}
]
},
{
"date": "2012-01-08T05:00:00.000Z",
"gameNumber": "-2",
"location": "96 Alexander",
"players": [
{
"name": "Autumn",
"wonder": "",
"side": "A",
"scores": {
"military": -1,
"coindebt": 1,
"wonder": 10,
"civic": 6,
"trade": 0,
"guilds": 9,
"science": 9,
"leaders": 0
},
"total": 34
},
{
"name": "Joel",
"wonder": "",
"side": "A",
"scores": {
"military": 12,
"coindebt": 6,
"wonder": 10,
"civic": 14,
"trade": 6,
"guilds": 0,
"science": 4,
"leaders": 0
},
"total": 52
},
{
"name": "Dan",
"wonder": "",
"side": "A",
"scores": {
"military": 0,
"coindebt": 6,
"wonder": 10,
"civic": 14,
"trade": 6,
"guilds": 9,
"science": 13,
"leaders": 0
},
"total": 58
},
{
"name": "Jamie",
"wonder": "",
"side": "A",
"scores": {
"military": 5,
"coindebt": 2,
"wonder": 10,
"civic": 15,
"trade": 3,
"guilds": 6,
"science": 5,
"leaders": 0
},
"total": 46
}
],
"totalPoints": 190,
"cities": false,
"winners": [
{
"name": "Dan",
"wonder": "",
"score": 58
}
]
},
{
"date": "2011-12-25T05:00:00.000Z",
"gameNumber": 1,
"location": "96 Alexander",
"players": [
{
"name": "Joel",
"wonder": "Giza",
"side": "B",
"scores": {
"military": -4,
"coindebt": 4,
"wonder": 13,
"civic": 19,
"trade": 8,
"guilds": 6,
"science": 0,
"leaders": 0
},
"total": 46
},
{
"name": "Tyler",
"wonder": "Halikanarsis",
"side": "B",
"scores": {
"military": 13,
"coindebt": 5,
"wonder": 3,
"civic": 11,
"trade": 0,
"guilds": 0,
"science": 9,
"leaders": 0
},
"total": 41
},
{
"name": "Shane",
"wonder": "Ephesus",
"side": "B",
"scores": {
"military": 7,
"coindebt": 5,
"wonder": 10,
"civic": 8,
"trade": 0,
"guilds": 10,
"science": 8,
"leaders": 0
},
"total": 48
},
{
"name": "Jamie",
"wonder": "Rhodes",
"side": "B",
"scores": {
"military": 6,
"coindebt": 3,
"wonder": 7,
"civic": 14,
"trade": 4,
"guilds": 8,
"science": 7,
"leaders": 0
},
"total": 49
}
],
"totalPoints": 184,
"cities": false,
"winners": [
{
"name": "Jamie",
"wonder": "Rhodes",
"score": 49
}
]
}
]
var fs = require('fs')
, tabletop = require('tabletop')
, d3 = require('d3')
, models
, locations
, gameDateFormat = d3.time.format('%Y-%m-%d')
var key = 'https://docs.google.com/spreadsheet/pub?key=0AmhWglGO45rldFBiek84a1FHRmhPQjZaVzRSRGJZbXc&output=html'
tabletop.init({
key: key,
callback: loaded
});
function loaded(data, tabletop) {
var games = [];
// i'm getting TableTop models because i want to see all the sheets
models = data;
// Enumerate through the sheets
for (var key in models) {
// Discard the template sheet
if (models.hasOwnProperty(key) && key !== 'Template') {
var date = gameDateFormat.parse(key.slice(0, 10));
var gameNumberString = (key.length > 10) ? key.slice(10): 1;
// Put the players into workable objects
var players = models[key].elements.map(function(player) {
return {
name: player.name,
wonder: player.wonder,
side: player.boardtypeab,
scores: {
military: +player.military,
coindebt: +player.coindebt,
wonder: +player.wonder_2,
civic: +player.civic,
trade: +player.trade,
guilds: +player.guilds,
science: +player.science,
leaders: +player.leadersblackmarket
},
total: +player.total
}
})
// Calculate the winning score, then filter matching players to account for ties
var winningScore = d3.max(players, function(player) {
return player.total
})
// Figure out the winners
var winners = players.filter(function(player) {
return (player.total == winningScore)
})
// Build the final game data object
var game = {
date: date,
gameNumber: gameNumberString,
location: models[key].elements[0].location,
players: players,
totalPoints: players.reduce(function(prev, curr) {
return prev + curr.total;
}, 0),
cities: players.every(function(player) {
return (player.citiesyn === 'TRUE' ||
player.citiesyn === 'Y')
}),
winners: winners.map(function(winner) {
return {
name: winner.name,
wonder: winner.wonder,
score: winner.total
}
})
};
// Push the final game object intot eh
games.push(game);
}
}
// After the data has been processed, write out the data file
fs.writeFileSync('games.json', JSON.stringify(games, null, 4));
}
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var games;
d3.json('games.json', function(err, data) {
if (err) return console.warn(err)
games = data
console.log(data)
})
</script>
{
"name": "7WondersSpreadsheetData",
"version": "0.0.1",
"description": "Converts 7 Wonders game data from a spreadsheet to json",
"main": "get_games.js",
"scripts": {
"start": "node get_games.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gist.github.com/9992169.git"
},
"keywords": [
"7Wonders",
"game",
"data"
],
"author": "James R Sconfitto",
"license": "MIT",
"bugs": {
"url": "https://gist.github.com/9992169"
},
"homepage": "https://gist.github.com/9992169",
"dependencies": {
"tabletop": "~1.3.3",
"d3": "~3.4.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment