Flag Wars

Online deck generator for a playing card game.

This project is maintained by suurjaak

Flag Wars

Flag Wars (lipukaardid in Estonian) was a fairly popular game in parts of Soviet Estonia. As such cards were not produced by any Soviet manufacturer, and colour printing was not easily available to the general public, kids drew the cards themselves. Some even cut flags out of books and glued them on.

My own hand-drawn set, from around 1992:

Hand-drawn deck

Print-ready HTML generated from Wikipedia data, 2014:

Printable deck

Gameplay

Play: Shuffle and deal all cards. Player next to dealer leads the first round.

Each round: Leader announces a field from their topmost card. Player with the best score puts the trick under their deck and leads the next round. If a player's card has no value in chosen field, leader must choose another field.

Compare: Higher numbers are better, except for obesity rate. If best values are equal, tied players include their next card.

Endgame: With 3 cards or less, player can choose which card to use.

Game over: When one player loses all cards. Or when last player remains.

In general, very similar to War.

Generating

Generator is a single stand-alone HTML page, using embedded JavaScript to retrieve the country list from Wikipedia and make a number of separate queries to assemble card data: reading statistics from country and capital pages, counting colours in flag and coat-of-arms images.

When generating is complete, the resulting deck can be printed immediately, or saved to a file on your computer. File can be saved with embedded images, making it completely stand-alone and not dependent on online Wikipedia.

The number of flag/heraldic colours is blindly parsed from SVG image data, counting every colour value from image vector attributes. As some image vectors are crafted quite intricately, numbers can get absurdly large.

Works best in Chrome and Firefox. Printing is crude in Safari and Opera; Internet Explorer has poor performance in general.

Attribution

Card generator uses jQuery, http://jquery.com.

Images and most data from Wikipedia.

Obesity data from CIA World Factbook 2016, https://www.cia.gov/library/publications/the-world-factbook/rankorder/2228rank.html.

Obesity data for Estonia from "Obesity, impaired glucose regulation, metabolic syndrome and their associations with high-molecular-weight adiponectin levels" by Triin Eglit, 2014-02-14, http://dspace.utlib.ee/dspace/handle/10062/37323.

License

The MIT License
Copyright (C) 2014 by Erki Suurjaak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.