├── .gitattributes ├── app ├── .buildignore ├── robots.txt ├── favicon.ico ├── images │ └── yeoman.png ├── styles │ ├── import.scss │ ├── main.scss │ └── print.scss ├── views │ ├── partials │ │ ├── print.html │ │ ├── import.html │ │ └── main.html │ ├── 404.html │ └── index.html ├── scripts │ ├── services │ │ └── user.js │ ├── controllers │ │ ├── import.js │ │ └── print.js │ └── app.js └── .htaccess ├── .bowerrc ├── lib ├── config │ ├── env │ │ ├── test.js │ │ ├── development.js │ │ ├── all.js │ │ └── production.js │ ├── config.js │ └── express.js ├── .jshintrc ├── routes.js └── controllers │ ├── index.js │ └── api.js ├── .travis.yml ├── .gitignore ├── CardGamePrototyper.sublime-project ├── test ├── client │ ├── runner.html │ ├── spec │ │ ├── services │ │ │ └── user.js │ │ └── controllers │ │ │ ├── main.js │ │ │ ├── print.js │ │ │ └── import.js │ └── .jshintrc ├── server │ └── thing │ │ └── api.js └── karma.conf.js ├── .editorconfig ├── bower.json ├── .jshintrc ├── server.js ├── package.json ├── README.md └── Gruntfile.js /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /app/.buildignore: -------------------------------------------------------------------------------- 1 | *.coffee -------------------------------------------------------------------------------- /app/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "app/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /lib/config/env/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | env: 'test' 5 | }; -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrantGamesGames/CardGamePrototyper/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /lib/config/env/development.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | env: 'development' 5 | }; -------------------------------------------------------------------------------- /app/images/yeoman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrantGamesGames/CardGamePrototyper/HEAD/app/images/yeoman.png -------------------------------------------------------------------------------- /app/styles/import.scss: -------------------------------------------------------------------------------- 1 | .csv-import { 2 | 3 | textarea { 4 | width: 100%; 5 | min-height: 600px; 6 | } 7 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.10' 4 | before_script: 5 | - 'npm install -g bower grunt-cli' 6 | - 'bower install' 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | public 3 | .tmp 4 | .sass-cache 5 | app/bower_components 6 | heroku 7 | /views 8 | dist 9 | .grunt 10 | 11 | *.sublime-workspace -------------------------------------------------------------------------------- /lib/config/env/all.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var path = require('path'); 4 | 5 | var rootPath = path.normalize(__dirname + '/../../..'); 6 | 7 | module.exports = { 8 | root: rootPath, 9 | ip: '0.0.0.0', 10 | port: process.env.PORT || 9000 11 | }; -------------------------------------------------------------------------------- /lib/config/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | 5 | /** 6 | * Load environment configuration 7 | */ 8 | module.exports = _.merge( 9 | require('./env/all.js'), 10 | require('./env/' + process.env.NODE_ENV + '.js') || {}); -------------------------------------------------------------------------------- /lib/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "bitwise": true, 5 | "eqeqeq": true, 6 | "immed": true, 7 | "latedef": true, 8 | "newcap": true, 9 | "noarg": true, 10 | "regexp": true, 11 | "undef": true, 12 | "smarttabs": true 13 | } -------------------------------------------------------------------------------- /CardGamePrototyper.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "follow_symlinks": true, 6 | "path": ".", 7 | "folder_exclude_patterns": [ 8 | "dist", 9 | ".tmp", 10 | ".sass-cache", 11 | "node_modules" 12 | ] 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /test/client/runner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |{{card.type.Description}}
8 |{{value.type.Description}}
10 |To recreate the doc above:
29 | * Open the [Google Docs Template](https://docs.google.com/spreadsheets/d/1W1_9gVEfpQlfFlWHbc9E0ZqS37XCZpAQnUs1sawd0gc/edit?usp=sharing) 30 | * In Google Docs go to *File* -> *Make a copy...* 31 | * Customise for your game 32 | * To get the csv from Google Docs, use *File* -> *Download as* -> *Comma Separated Values (.csv, current sheet)* 33 | 34 | Which would produce when exported: 35 | 36 | ```csv 37 | Name,Quantity,Hint,Description,Probability 38 | Seer,1,S,"When instructed, pick one player and the moderator will tell you if they're a werewolf.",14% 39 | Werewolf,2,W,At nightfall open your eyes and pick a victim,29% 40 | Villager,4,V,At daybreak try to find the werewolf,57% 41 | ``` 42 | 43 | Next paste that csv data into the app and press **Import Data**. This will convert the CSV to printable Poker Size (2.5" * 3.5") cards. 44 | 45 | Now print! When printing I recommend Landscape, which fits the most poker size cards. 46 | 47 | ## Is this printer friendly? 48 | Yes. We use css to hide the instructions. Just go file print in your browser. For best results print in landscape mode. 49 | 50 | ## How often will you be making updates to this tool? 51 | We will be trying to update every two weeks with a rev. The tool is also open source so if your an awesome developer we welcome your support. 52 | 53 | ## How do I get feature request in the builds? 54 | Wow! You want a lot for nothing. No seriously. Thanks for the feedback. Post in the [issues tracker on GitHub](https://github.com/astrism/CardGamePrototyper/issues) or email team AT godhatesgames.com -------------------------------------------------------------------------------- /lib/controllers/api.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Get awesome things 5 | */ 6 | exports.awesomeThings = function(req, res) { 7 | res.json([ 8 | { 9 | "Type":"Hand", 10 | "Name":"Straight Flush", 11 | "Quantity":1, 12 | "Description":"2" 13 | }, 14 | { 15 | "Type":"Hand", 16 | "Name":"Royal Flush", 17 | "Quantity":1, 18 | "Description":"1" 19 | }, 20 | { 21 | "Type":"Hand", 22 | "Name":"Four of a Kind", 23 | "Quantity":1, 24 | "Description":"3" 25 | }, 26 | { 27 | "Type":"Hand", 28 | "Name":"Full House", 29 | "Quantity":1, 30 | "Description":"4" 31 | }, 32 | { 33 | "Type":"Hnad", 34 | "Name":"Flush", 35 | "Quantity":2, 36 | "Description":"5" 37 | }, 38 | { 39 | "Type":"Hand", 40 | "Name":"Straight", 41 | "Quantity":2, 42 | "Description":"6" 43 | }, 44 | { 45 | "Type":"Hand", 46 | "Name":"Three of a Kind", 47 | "Quantity":3, 48 | "Description":"7" 49 | }, 50 | { 51 | "Type":"Hand", 52 | "Name":"Two Pair", 53 | "Quantity":3, 54 | "Description":"8" 55 | }, 56 | { 57 | "Type":"Hand", 58 | "Name":"One Pair", 59 | "Quantity":4, 60 | "Description":"9" 61 | }, 62 | { 63 | "Type":"Hand", 64 | "Name":"High Card", 65 | "Quantity":5, 66 | "Description":"10" 67 | }, 68 | { 69 | "Type":"Action", 70 | "Name":"Cheat", 71 | "Quantity":5, 72 | "Description":"Look at any players hand" 73 | }, 74 | { 75 | "Type":"Action", 76 | "Name":"Spot", 77 | "Quantity":5, 78 | "Description":"Stop a cheat. Can be used to stop a cheat on any player" 79 | }, 80 | { 81 | "Type":"Action", 82 | "Name":"Slight Of Hand", 83 | "Quantity":3, 84 | "Description":"Switch a Hand CARD With Another Player" 85 | }, 86 | { 87 | "Type":"Action", 88 | "Name":"Mark", 89 | "Quantity":3, 90 | "Description":"Randomly Trade A Hand Card with another Another Player" 91 | }, 92 | { 93 | "Type":"Action", 94 | "Name":"Threat", 95 | "Quantity":2, 96 | "Description":"Force a player to fold" 97 | }, 98 | { 99 | "Type":"Action", 100 | "Name":"Shoot", 101 | "Quantity":2, 102 | "Description":"Assignate another player" 103 | }, 104 | { 105 | "Type":"Action", 106 | "Name":"Arrest", 107 | "Quantity":2, 108 | "Description":"Remove a player from the hand. They can't use any Actions" 109 | }, 110 | { 111 | "Type":"Player", 112 | "Name":"Judge Roy Bean", 113 | "Quantity":1, 114 | "Description":"The Judge Can Arrest Anyone who Shoots someone else" 115 | }, 116 | { 117 | "Type":"Player", 118 | "Name":"\"Doc\" Holliday", 119 | "Quantity":1, 120 | "Description":"Doc Can Shoot anyone who has shot someone else" 121 | }, 122 | { 123 | "Type":"Player", 124 | "Name":"Billy the Kid", 125 | "Quantity":1, 126 | "Description":"Can use a Shoot as a threat." 127 | }, 128 | { 129 | "Type":"Player", 130 | "Name":"Calamity Jane", 131 | "Quantity":1, 132 | "Description":"Can't be cheated" 133 | }, 134 | { 135 | "Type":"Player", 136 | "Name":"Buffalo Bill", 137 | "Quantity":1, 138 | "Description":"Can discard hand card and draw another hand card" 139 | } 140 | ]); 141 | }; -------------------------------------------------------------------------------- /app/views/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Sorry, but the page you were trying to view does not exist.
146 |It looks like this was the result of either:
147 |Loading...
35 |CSV -> printable card game.
47 | 48 |This tool takes in CSV take and generates a printable card game. Works in Chrome, Safari, Firefox as far as I know. I recommend Chrome as its handling of printing is the best.
53 | 54 |Grab a CSV file, I use Google Spreadsheets to put mine together and most spreadsheet apps can export to csv. Your CSV can have any fields but the app only uses these:
59 | 60 |This is a basic Werewolf example which uses all the required fields listed above, and even has an extra field, Probability, that the app ignores.
68 | 69 | 72 | 73 |To recreate the doc above:
74 |Which would produce when exported:
86 | 87 |Name,Quantity,Hint,Description,Probability
88 | Seer,1,S,"When instructed, pick one player and the moderator will tell you if they're a werewolf.",14%
89 | Werewolf,2,W,At nightfall open your eyes and pick a victim,29%
90 | Villager,4,V,At daybreak try to find the werewolf,57%
91 |
92 | Next paste that csv data into the app and press 93 | Import Data. This will convert the CSV to printable Poker Size (2.5" * 3.5") cards.
94 | 95 |Now print! When printing I recommend Landscape, which fits the most poker size cards.
96 | 97 |Yes. We use css to hide the instructions. Just go file print in your browser. For best results print in landscape mode.
99 | 100 |Wow! You want a lot for nothing. No seriously. Thanks for the feedback. Post in the issues tracker on GitHub or email team AT godhatesgames.com
102 |