Created
October 21, 2014 04:41
-
-
Save puumuki/fece0a44a6f46984cc4a to your computer and use it in GitHub Desktop.
python - osx supported games
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from functools import reduce | |
from collections import namedtuple | |
games = [ | |
("10,000,000",True), | |
("Ace of Spades",False), | |
("Alien Swarm",False), | |
("BRINK",False), | |
("Bastion",True), | |
("Battlefield: Bad Company 2",False), | |
("Battlefield: Bad Company 2 Vietnam",False), | |
("Beat Hazard",True), | |
("Broforce",True), | |
("Call of Duty 4: Modern Warfare",True), | |
("Call of Duty: Black Ops",True), | |
("Call of Duty: Black Ops - Multiplayer",True), | |
("Call of Duty: Modern Warfare 2",True), | |
("Call of Duty: Modern Warfare 2 - Multiplayer",True), | |
("Castle Story",True), | |
("Command and Conquer: Red Alert 3",False), | |
("Counter-Strike",True), | |
("Counter-Strike: Global Offensive",True), | |
("Counter-Strike: Source",True), | |
("Counter-Strike: Source Beta",True), | |
("Day of Defeat",True), | |
("Day of Defeat: Source",True), | |
("Dead Island",True), | |
("Dead Pixels",False), | |
("Deadlight",False), | |
("Death Rally",False), | |
("Deathmatch Classic",True), | |
("Deus Ex: Human Revolution",True), | |
("DiRT 2",False), | |
("Divekick",False), | |
("Dota 2",True), | |
("E.Y.E: Divine Cybermancy",False), | |
("FEZ",True), | |
("FTL: Faster Than Light",True), | |
("Flight Control HD",True), | |
("Grand Theft Auto IV",False), | |
("Gunpoint",False), | |
("HAWKEN",False), | |
("Half-Life",True), | |
("Half-Life 2",True), | |
("Half-Life 2: Deathmatch",True), | |
("Half-Life 2: Lost Coast",True), | |
("Half-Life: Blue Shift",True), | |
("Half-Life: Opposing Force",True), | |
("Hammerwatch",True), | |
("Heroes & Generals",False), | |
("Hotline Miami",False), | |
("Just Cause 2",False), | |
("Killing Floor",True), | |
("Killing Floor Mod: Defence Alliance 2",True), | |
("LUFTRAUSERS",True), | |
("Left 4 Dead",True), | |
("Left 4 Dead 2",True), | |
("Legend of Dungeon",True), | |
("Magic: The Gathering - Duels of the Planeswalkers",False), | |
("Magicka",False), | |
("Medal of Honor Pre-Order",False), | |
("Medal of Honor(TM) Multiplayer",False), | |
("Medal of Honor(TM) Single Player",False), | |
("Medieval II: Total War",True), | |
("Medieval II: Total War Kingdoms",True), | |
("Men of War",False), | |
("Men of War: Assault Squad",False), | |
("Men of War: Condemned Heroes",False), | |
("Men of War: Red Tide",False), | |
("Men of War: Vietnam",False), | |
("Mirror's Edge",False), | |
("Mount & Blade: Warband",True), | |
("Mount & Blade: With Fire and Sword",False), | |
("Napoleon: Total War",True), | |
("Need for Speed: Hot Pursuit",False), | |
("Orcs Must Die!",False), | |
("Orcs Must Die! 2",False), | |
("PAYDAY 2",False), | |
("PAYDAY: The Heist",False), | |
("Papers, Please",True), | |
("Pirates, Vikings, & Knights II",False), | |
("Planetary Annihilation",True), | |
("Portal",True), | |
("Portal 2",True), | |
("Prince of Persia: The Sands of Time",False), | |
("Recettear: An Item Shop's Tale",False), | |
("Red Orchestra 2: Heroes of Stalingrad - Single Player",False), | |
("Red Orchestra 2: Heroes of Stalingrad Beta",False), | |
("Reus",False), | |
("Ricochet",True), | |
("Rising Storm Beta",False), | |
("Rising Storm/Red Orchestra 2 Multiplayer",False), | |
("Saints Row: The Third",False), | |
("Serious Sam 3: BFE",True), | |
("Shank",True), | |
("Shank 2",True), | |
("Sniper Elite",False), | |
("Space Engineers",False), | |
("Space Pirates and Zombies",True), | |
("Space Run",True), | |
("Starbound",True), | |
("Supreme Commander: Forged Alliance",False), | |
("Synergy",True), | |
("Team Fortress 2",True), | |
("Team Fortress 2 Beta",True), | |
("Team Fortress Classic",True), | |
("Teleglitch: Die More Edition",True), | |
("Terraria",False), | |
("The Banner Saga",True), | |
("The Banner Saga - Mod Content ",False), | |
("Tom Clancy's Rainbow Six: Vegas 2",False), | |
("Torchlight",True), | |
("Trials 2: Second Edition",False), | |
("Trine 2",True), | |
("Tropico 4",True), | |
("Valdis Story: Abyssal City",False), | |
("War Thunder",True), | |
("World of Goo",True), | |
("Worms Reloaded",True), | |
("XCOM: Enemy Unknown",True), | |
("iBomber Defense Pacific",True), | |
] | |
Game = namedtuple('Game',['name','macsupported']) | |
total_number = len(games) | |
games = map( lambda game: Game(name=game[0], macsupported=game[1]) , games) | |
mac_supported_games = reduce(lambda num, game: num+1 if game.macsupported else num , games,0 ) | |
mac_supported_percentage = (mac_supported_games / total_number * 100) | |
mac_non_supported_games = reduce(lambda num, game: num+1 if not game.macsupported else num, games ,0) | |
print("Total non supported games %s" % (mac_non_supported_games)) | |
print("Total number of games: %s" % (total_number)) | |
print("Total number of supported games: %s" % mac_supported_games) | |
print("Total number of non supported games: %s" % (total_number - mac_supported_games)) | |
print("Percentage of mac supported games: %s%%" % round(mac_supported_percentage,2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks that helps