From 493b116f73ec3912ca7af3d6ece3434279cbcfb5 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 9 Mar 2018 13:38:22 +0100 Subject: renamed the project SwiftStory Signed-off-by: Olivier Gayot --- CAO/Board.py | 55 -- CAO/Cards.py | 13 - CAO/Client.py | 73 --- CAO/Game.py | 235 --------- CAO/GameManager.py | 34 -- CAO/Player.py | 43 -- CAO/Status.py | 7 - CAO/__init__.py | 0 README | 2 +- bower.json | 2 +- cao-server | 72 --- setup.py | 8 +- swiftstory/Board.py | 55 ++ swiftstory/Cards.py | 13 + swiftstory/Client.py | 73 +++ swiftstory/Game.py | 235 +++++++++ swiftstory/GameManager.py | 34 ++ swiftstory/Player.py | 43 ++ swiftstory/Status.py | 7 + swiftstory/__init__.py | 0 swiftstoryd | 72 +++ usr/share/cao/lang/en/cards/black | 163 ------ usr/share/cao/lang/en/cards/white | 828 ------------------------------- usr/share/cao/lang/fr/cards/black | 60 --- usr/share/cao/lang/fr/cards/white | 396 --------------- usr/share/swiftstory/lang/en/cards/black | 163 ++++++ usr/share/swiftstory/lang/en/cards/white | 828 +++++++++++++++++++++++++++++++ usr/share/swiftstory/lang/fr/cards/black | 60 +++ usr/share/swiftstory/lang/fr/cards/white | 396 +++++++++++++++ webapp/cao-common.css | 32 -- webapp/cao-common.js | 348 ------------- webapp/cao-config.js | 13 - webapp/cao-desktop.html | 21 - webapp/cao-desktop.js | 88 ---- webapp/cao-mobile.css | 147 ------ webapp/cao-mobile.html | 41 -- webapp/cao-mobile.js | 155 ------ webapp/index.html | 2 +- webapp/swiftstory-common.css | 32 ++ webapp/swiftstory-common.js | 348 +++++++++++++ webapp/swiftstory-config.js | 13 + webapp/swiftstory-desktop.html | 21 + webapp/swiftstory-desktop.js | 88 ++++ webapp/swiftstory-mobile.css | 147 ++++++ webapp/swiftstory-mobile.html | 41 ++ webapp/swiftstory-mobile.js | 155 ++++++ 46 files changed, 2831 insertions(+), 2831 deletions(-) delete mode 100644 CAO/Board.py delete mode 100644 CAO/Cards.py delete mode 100644 CAO/Client.py delete mode 100644 CAO/Game.py delete mode 100644 CAO/GameManager.py delete mode 100644 CAO/Player.py delete mode 100644 CAO/Status.py delete mode 100644 CAO/__init__.py delete mode 100755 cao-server create mode 100644 swiftstory/Board.py create mode 100644 swiftstory/Cards.py create mode 100644 swiftstory/Client.py create mode 100644 swiftstory/Game.py create mode 100644 swiftstory/GameManager.py create mode 100644 swiftstory/Player.py create mode 100644 swiftstory/Status.py create mode 100644 swiftstory/__init__.py create mode 100755 swiftstoryd delete mode 100644 usr/share/cao/lang/en/cards/black delete mode 100644 usr/share/cao/lang/en/cards/white delete mode 100644 usr/share/cao/lang/fr/cards/black delete mode 100644 usr/share/cao/lang/fr/cards/white create mode 100644 usr/share/swiftstory/lang/en/cards/black create mode 100644 usr/share/swiftstory/lang/en/cards/white create mode 100644 usr/share/swiftstory/lang/fr/cards/black create mode 100644 usr/share/swiftstory/lang/fr/cards/white delete mode 100644 webapp/cao-common.css delete mode 100644 webapp/cao-common.js delete mode 100644 webapp/cao-config.js delete mode 100644 webapp/cao-desktop.html delete mode 100644 webapp/cao-desktop.js delete mode 100644 webapp/cao-mobile.css delete mode 100644 webapp/cao-mobile.html delete mode 100644 webapp/cao-mobile.js create mode 100644 webapp/swiftstory-common.css create mode 100644 webapp/swiftstory-common.js create mode 100644 webapp/swiftstory-config.js create mode 100644 webapp/swiftstory-desktop.html create mode 100644 webapp/swiftstory-desktop.js create mode 100644 webapp/swiftstory-mobile.css create mode 100644 webapp/swiftstory-mobile.html create mode 100644 webapp/swiftstory-mobile.js diff --git a/CAO/Board.py b/CAO/Board.py deleted file mode 100644 index 4f4e7c6..0000000 --- a/CAO/Board.py +++ /dev/null @@ -1,55 +0,0 @@ -import random - -class Board(): - def __init__(self, white_cards, black_cards): - self.white_pick = white_cards - self.black_pick = black_cards - - self.white_recycled = [] - self.black_recycled = [] - - self.current_black_card = None - - # tupple of cards / player currently being played - self.played_cards = [] - - random.shuffle(self.white_pick) - random.shuffle(self.black_pick) - - def reveal_black_card(self): - if not self.black_pick: - self.black_pick = self.black_recycle - - random.shuffle(self.black_pick) - - self.black_recycled = [] - - card = self.black_pick.pop() - - self.current_black_card = card - - def recycle_black_card(self): - self.black_recycled.append(self.current_black_card) - - def pick_white_card(self): - if not self.white_pick: - self.white_pick = self.white_recycled - - random.shuffle(self.white_pick) - - self.white_recycled = [] - - card = self.white_pick.pop() - - return card - - def play_card(self, player, card): - self.played_cards.append((card, player)) - - def shuffle_played_cards(self): - random.shuffle(self.played_cards) - - def recycle_played_cards(self): - self.white_recycled += [i[0] for i in self.played_cards] - - self.played_cards = [] diff --git a/CAO/Cards.py b/CAO/Cards.py deleted file mode 100644 index 01909fb..0000000 --- a/CAO/Cards.py +++ /dev/null @@ -1,13 +0,0 @@ -class Cards(): - @staticmethod - def get_white_cards(lang): - ''' Read the file containing the white cards and return a list of cards ''' - with open('usr/share/cao/lang/' + lang + '/cards/white') as fd: - return [line.strip() for line in fd] - - @staticmethod - def get_black_cards(lang): - ''' Read the file containing the black cards and return a list of cards ''' - - with open('usr/share/cao/lang/' + lang + '/cards/black') as fd: - return [line.strip() for line in fd] diff --git a/CAO/Client.py b/CAO/Client.py deleted file mode 100644 index 2d0bbac..0000000 --- a/CAO/Client.py +++ /dev/null @@ -1,73 +0,0 @@ -from CAO.Status import cao_error -from CAO.Game import Game - -class Client(): - def __init__(self, socket, handler, game_manager): - self.game = None - self.game_manager = game_manager - - self.handler = handler - self.socket = socket - self.player = None - - def join_game(self, game_name, lang): - if self.game is not None: - return cao_error('You are already in a game') - - if lang is None: - lang = 'en' - - game = self.game_manager.join_game(game_name, lang) - # XXX self.game will be assigned by game.try_join() - - if game is None: - return cao_error('Invalid language') - - return game.try_join(self) - - def set_game(self, game): - self.game = game - def set_player(self, player): - self.player = player - - def play_white_card(self, card_id): - if self.game is None: - return cao_error('You have to join a game first') - return self.game.try_play_card(self.player, card_id) - - def pick_black_card(self): - if self.game is None: - return cao_error('You have to join a game first') - return self.game.try_become_judge(self.player) - - def collect_cards(self): - if self.game is None: - cao_error('You have to join a game first') - return self.game.try_collect_cards(self.player) - - def designate_card(self, card_id): - if self.game is None: - return cao_error('You have to join a game first') - return self.game.try_designate_card(self.player, card_id) - - def view_player_cards(self): - if self.game is None: - return cao_error('You have to join a game first') - return self.game.try_view_player_cards(self.player) - - def view_played_cards(self): - if self.game is None: - return cao_error('You have to join a game first') - return self.game.try_view_played_cards(self.player) - - def view_black_card(self): - if self.game is None: - return cao_error('You have to join a game first') - return self.game.try_view_black_card(self.player) - - def send_notification(self, message): - self.socket.send_message(self.handler, message) - - def disconnect(self): - if self.player is not None: - self.game.disconnect(self.player) diff --git a/CAO/Game.py b/CAO/Game.py deleted file mode 100644 index 63f52eb..0000000 --- a/CAO/Game.py +++ /dev/null @@ -1,235 +0,0 @@ -from CAO.Player import Player -from CAO.Board import Board - -from CAO.Status import cao_error, cao_success - -import json - -class Game(): - WAITING_NEW_JUDGE = 0, - WAITING_COLLECTION = 1, - WAITING_DESIGNATION = 2, - - - def __init__(self, white_desc, black_desc): - self.white_desc = white_desc - self.black_desc = black_desc - - white_pick = [i for i in range(len(self.white_desc))] - black_pick = [i for i in range(len(self.black_desc))] - - self.state = self.WAITING_NEW_JUDGE - - self.players = [] - - self.judge = None - - self.board = Board(white_pick, black_pick) - - def try_join(self, client): - if len(self.players) >= 10: - return cao_error('too many players in this game') - - cards = [] - - try: - for i in range(10): - cards.append(self.board.pick_white_card()) - except IndexError: - return cao_error('no enough white cards for player') - - player = Player(client) - - for card in cards: - player.receive_card(card) - - client.set_player(player) - client.set_game(self) - - self.players.append(player) - - for p in self.players: - if p is not player: - p.send_notification({'op': 'player_joined_game'}) - - cards = self.__view_player_cards(player) - - if self.state is self.WAITING_NEW_JUDGE: - state = 'waiting_judge' - elif self.state is self.WAITING_COLLECTION: - state = 'waiting_collection' - else: - state = 'waiting_designation' - - return cao_success({'cards': cards, 'game_state': state}) - - - def try_become_judge(self, player): - if self.state is not self.WAITING_NEW_JUDGE: - # TODO what if the judge has quit ? - return cao_error('Someone is judge already') - - self.judge = player - self.board.reveal_black_card() - - self.state = self.WAITING_COLLECTION - - for p in self.players: - if p is not player: - p.send_notification({'op': 'judge_designed'}) - - return self.try_view_black_card(player) - - - def try_play_card(self, player, card_id): - if self.state is not self.WAITING_COLLECTION: - return cao_error('Who asked you to play now ?!') - - if self.judge is player: - return cao_error('You\'re the judge, you silly') - elif player.get_has_played(): - return cao_error('You already played, you dumb ass') - - try: - card = player.pop_card(card_id) - except IndexError: - return cao_error('Invalid card id') - - player.set_has_played() - - self.board.play_card(player, card) - - self.judge.send_notification({'op': 'card_played'}) - - return cao_success({'card_id': card_id}) - - - def try_collect_cards(self, player): - if self.state is not self.WAITING_COLLECTION: - return cao_error('Do you think it\'s the moment for colletion !?') - - if self.judge is not player: - return cao_error('You\'re not the judge, you fool!') - - self.board.shuffle_played_cards() - - # we prevent the others to play - self.state = self.WAITING_DESIGNATION - - for p in self.players: - if p is not player: - p.send_notification({'op': 'cards_collected'}) - - return self.try_view_played_cards(player) - - - def try_designate_card(self, player, card_id): - if self.state is not self.WAITING_DESIGNATION: - return cao_error('Not now, moron !') - - if self.judge is not player: - return cao_error('Who do you think you are !?') - - if card_id is None and len(self.board.played_cards) > 0: - return cao_error('There are cards on the board, pick one !') - - if card_id is not None or len(self.board.played_cards) > 0: - # if there are cards on the board - # TODO check exception - try: - card, winner = self.board.played_cards[card_id] - except IndexError: - return cao_error('Invalid card') - - winner.inc_score() - - # put the cards back in the deck - self.board.recycle_played_cards() - - # reset the state of the players - for p in self.players: - if p.get_has_played(): - idx = p.receive_card(self.board.pick_white_card()) - card_idx = p.cards[idx] - card_desc = self.white_desc[card_idx] - - p.send_notification({ - 'op': 'received_card', - 'content': { - 'card': { - 'id': idx, - 'desc': card_desc, - }, - }, - }) - p.set_has_played(False) - - self.board.recycle_black_card() - self.judge = None - - for p in self.players: - if p is not player: - p.send_notification({'op': 'judge_needed'}) - - self.state = self.WAITING_NEW_JUDGE - - return cao_success(None) - - def __view_player_cards(self, player): - cards = [] - - for card in player.cards: - cards.append((card, self.white_desc[player.cards[card]])) - - return cards - - def try_view_player_cards(self, player): - return cao_success(self.__view_player_cards(player)) - - def try_view_played_cards(self, player): - if self.state is not self.WAITING_DESIGNATION: - return cao_error('Not now, moron !') - - cards = [] - - for card, unused in self.board.played_cards: - cards.append(self.white_desc[card]) - - return cao_success(cards) - - def try_view_black_card(self, player): - card = self.board.current_black_card - - if card is not None: - return cao_success(self.black_desc[card]) - - return cao_error('The black card has not been revealed yet') - - def disconnect(self, player): - player.client = None - - if self.judge is player: - self.board.recycle_black_card() - self.judge = None - - for p in self.players: - p.send_notification({'op': 'judge_needed'}) - - for card, p in self.board.played_cards: - idx = p.receive_card(card) - card_idx = p.cards[idx] - card_desc = self.white_desc[card_idx] - - p.send_notification({ - 'op': 'received_card', - 'content': { - 'card': { - 'id': idx, - 'desc': card_desc, - }, - }, - }) - p.set_has_played(False) - - self.board.played_cards = [] - self.state = self.WAITING_NEW_JUDGE diff --git a/CAO/GameManager.py b/CAO/GameManager.py deleted file mode 100644 index 6e0d956..0000000 --- a/CAO/GameManager.py +++ /dev/null @@ -1,34 +0,0 @@ -from CAO.Game import Game -from CAO.Cards import Cards - -import os - -class GameManager(): - def __init__(self): - self.langs = {} - - for filename in next(os.walk('usr/share/cao/lang'))[1]: - self.langs[filename] = {} - - for lang in self.langs: - self.langs[lang]['black_cards'] = Cards.get_black_cards(lang) - self.langs[lang]['white_cards'] = Cards.get_white_cards(lang) - - self.langs[lang]['games'] = {} - - def join_game(self, game_name, lang): - if self.langs.get(lang) is None: - return None - - games = self.langs[lang]['games'] - black_cards = self.langs[lang]['black_cards'] - white_cards = self.langs[lang]['white_cards'] - - game = games.get(game_name) - - if game is None: - print('Starting new game') - - game = games[game_name] = Game(white_cards, black_cards) - - return game diff --git a/CAO/Player.py b/CAO/Player.py deleted file mode 100644 index cc64d17..0000000 --- a/CAO/Player.py +++ /dev/null @@ -1,43 +0,0 @@ -import json - -class Player(): - def __init__(self, client): - self.cards = {} - self.next_idx = 0 - - self.client = client - - self.score = 0 - - self.has_played = False - - self.name = 'default' - - def pop_card(self, card_id): - return self.cards.pop(card_id) - - def get_has_played(self): - return self.has_played - - def set_has_played(self, has=True): - self.has_played = has - - def inc_score(self): - self.score += 1 - self.send_notification({ - 'op': 'updated_score', - 'content': self.score, - }) - - def receive_card(self, card): - self.cards[self.next_idx] = card - self.next_idx += 1 - return self.next_idx - 1 - - def send_notification(self, obj): - if self.client is None: - return - - message = json.dumps({'type': 'notification', 'content': obj}) - - self.client.send_notification(message) diff --git a/CAO/Status.py b/CAO/Status.py deleted file mode 100644 index 782a0b4..0000000 --- a/CAO/Status.py +++ /dev/null @@ -1,7 +0,0 @@ -import json - -def cao_error(msg, code=255): - return json.dumps({'type': 'response', 'content': {'status': code, 'info': msg}}) - -def cao_success(obj): - return json.dumps({'type': 'response', 'content': {'status': 0, 'result': obj}}) diff --git a/CAO/__init__.py b/CAO/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/README b/README index 4c7fe82..510e8b4 100644 --- a/README +++ b/README @@ -15,7 +15,7 @@ Execution Start the python server (it will listen to any connection on port 1236) - $ chdir / && cao-server & + $ chdir / && swiftstoryd & Installation of the web application =================================== diff --git a/bower.json b/bower.json index 1546405..93a9810 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,5 @@ { - "name": "CAO", + "name": "SwiftStory", "version": "0.0.0", "authors": [ "Jeremie Taboada " diff --git a/cao-server b/cao-server deleted file mode 100755 index 162cd5d..0000000 --- a/cao-server +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python - -from websocket_server import WebsocketServer -import CAO.GameManager -import CAO.Client -from CAO.Status import cao_error - -import json - -game_manager = CAO.GameManager.GameManager() - -def new_client_handler(client, server): - client['cao_client'] = CAO.Client.Client(server, client, game_manager) - -def client_left_handler(client, server): - client['cao_client'].disconnect(); - -def message_received_handler(client, server, message): - try: - json_msg = json.loads(message) - except: - res = cao_error('badly formatted json') - else: - op = json_msg['op'] - if op == 'join_game': - try: - game_name = json_msg['game_name'] - except KeyError: - res = cao_error('field `game_name\' is required') - else: - lang = json_msg.get('lang') - res = client['cao_client'].join_game(game_name, lang) - elif op == 'view_player_cards': - res = client['cao_client'].view_player_cards() - elif op == 'view_black_card': - res = client['cao_client'].view_black_card() - elif op == 'view_played_cards': - res = client['cao_client'].view_played_cards() - elif op == 'pick_black_card': - res = client['cao_client'].pick_black_card() - elif op == 'designate_card': - card_id = None - try: - card_id = int(json_msg['card_id']) - except (KeyError, TypeError): - pass - finally: - res = client['cao_client'].designate_card(card_id) - elif op == 'play_white_card': - try: - card_id = int(json_msg['card_id']) - except KeyError: - res = cao_error('field `card_id\' is required') - else: - res = client['cao_client'].play_white_card(card_id) - elif op == 'collect_cards': - res = client['cao_client'].collect_cards() - else: - res = cao_error('invalid command') - - server.send_message(client, res) - -def main(): - server = WebsocketServer(1236, '0.0.0.0') - server.set_fn_new_client(new_client_handler) - server.set_fn_client_left(client_left_handler) - server.set_fn_message_received(message_received_handler) - - server.run_forever() - -if __name__ == '__main__': - main() diff --git a/setup.py b/setup.py index 86a1f22..f192370 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ from distutils.core import setup packages = [ - 'CAO', + 'SwiftStory', ] prefix = '/' -share_dir = 'usr/share/cao/' +share_dir = 'usr/share/swiftstory/' data_files = list() @@ -24,11 +24,11 @@ for n in os.walk('usr'): print(data_files) scripts = [ - 'cao-server', + 'swiftstoryd', ] setup( - name='cao', + name='swiftstory', version='0.1', packages=packages, data_files=data_files, diff --git a/swiftstory/Board.py b/swiftstory/Board.py new file mode 100644 index 0000000..4f4e7c6 --- /dev/null +++ b/swiftstory/Board.py @@ -0,0 +1,55 @@ +import random + +class Board(): + def __init__(self, white_cards, black_cards): + self.white_pick = white_cards + self.black_pick = black_cards + + self.white_recycled = [] + self.black_recycled = [] + + self.current_black_card = None + + # tupple of cards / player currently being played + self.played_cards = [] + + random.shuffle(self.white_pick) + random.shuffle(self.black_pick) + + def reveal_black_card(self): + if not self.black_pick: + self.black_pick = self.black_recycle + + random.shuffle(self.black_pick) + + self.black_recycled = [] + + card = self.black_pick.pop() + + self.current_black_card = card + + def recycle_black_card(self): + self.black_recycled.append(self.current_black_card) + + def pick_white_card(self): + if not self.white_pick: + self.white_pick = self.white_recycled + + random.shuffle(self.white_pick) + + self.white_recycled = [] + + card = self.white_pick.pop() + + return card + + def play_card(self, player, card): + self.played_cards.append((card, player)) + + def shuffle_played_cards(self): + random.shuffle(self.played_cards) + + def recycle_played_cards(self): + self.white_recycled += [i[0] for i in self.played_cards] + + self.played_cards = [] diff --git a/swiftstory/Cards.py b/swiftstory/Cards.py new file mode 100644 index 0000000..78dd64a --- /dev/null +++ b/swiftstory/Cards.py @@ -0,0 +1,13 @@ +class Cards(): + @staticmethod + def get_white_cards(lang): + ''' Read the file containing the white cards and return a list of cards ''' + with open('usr/share/swiftstory/lang/' + lang + '/cards/white') as fd: + return [line.strip() for line in fd] + + @staticmethod + def get_black_cards(lang): + ''' Read the file containing the black cards and return a list of cards ''' + + with open('usr/share/swiftstory/lang/' + lang + '/cards/black') as fd: + return [line.strip() for line in fd] diff --git a/swiftstory/Client.py b/swiftstory/Client.py new file mode 100644 index 0000000..33b8e4b --- /dev/null +++ b/swiftstory/Client.py @@ -0,0 +1,73 @@ +from swiftstory.Status import error +from swiftstory.Game import Game + +class Client(): + def __init__(self, socket, handler, game_manager): + self.game = None + self.game_manager = game_manager + + self.handler = handler + self.socket = socket + self.player = None + + def join_game(self, game_name, lang): + if self.game is not None: + return error('You are already in a game') + + if lang is None: + lang = 'en' + + game = self.game_manager.join_game(game_name, lang) + # XXX self.game will be assigned by game.try_join() + + if game is None: + return error('Invalid language') + + return game.try_join(self) + + def set_game(self, game): + self.game = game + def set_player(self, player): + self.player = player + + def play_white_card(self, card_id): + if self.game is None: + return error('You have to join a game first') + return self.game.try_play_card(self.player, card_id) + + def pick_black_card(self): + if self.game is None: + return error('You have to join a game first') + return self.game.try_become_judge(self.player) + + def collect_cards(self): + if self.game is None: + error('You have to join a game first') + return self.game.try_collect_cards(self.player) + + def designate_card(self, card_id): + if self.game is None: + return error('You have to join a game first') + return self.game.try_designate_card(self.player, card_id) + + def view_player_cards(self): + if self.game is None: + return error('You have to join a game first') + return self.game.try_view_player_cards(self.player) + + def view_played_cards(self): + if self.game is None: + return error('You have to join a game first') + return self.game.try_view_played_cards(self.player) + + def view_black_card(self): + if self.game is None: + return error('You have to join a game first') + return self.game.try_view_black_card(self.player) + + def send_notification(self, message): + self.socket.send_message(self.handler, message) + + def disconnect(self): + if self.player is not None: + self.game.disconnect(self.player) diff --git a/swiftstory/Game.py b/swiftstory/Game.py new file mode 100644 index 0000000..5e0961c --- /dev/null +++ b/swiftstory/Game.py @@ -0,0 +1,235 @@ +from swiftstory.Player import Player +from swiftstory.Board import Board + +from swiftstory.Status import error, success + +import json + +class Game(): + WAITING_NEW_JUDGE = 0, + WAITING_COLLECTION = 1, + WAITING_DESIGNATION = 2, + + + def __init__(self, white_desc, black_desc): + self.white_desc = white_desc + self.black_desc = black_desc + + white_pick = [i for i in range(len(self.white_desc))] + black_pick = [i for i in range(len(self.black_desc))] + + self.state = self.WAITING_NEW_JUDGE + + self.players = [] + + self.judge = None + + self.board = Board(white_pick, black_pick) + + def try_join(self, client): + if len(self.players) >= 10: + return error('too many players in this game') + + cards = [] + + try: + for i in range(10): + cards.append(self.board.pick_white_card()) + except IndexError: + return error('no enough white cards for player') + + player = Player(client) + + for card in cards: + player.receive_card(card) + + client.set_player(player) + client.set_game(self) + + self.players.append(player) + + for p in self.players: + if p is not player: + p.send_notification({'op': 'player_joined_game'}) + + cards = self.__view_player_cards(player) + + if self.state is self.WAITING_NEW_JUDGE: + state = 'waiting_judge' + elif self.state is self.WAITING_COLLECTION: + state = 'waiting_collection' + else: + state = 'waiting_designation' + + return success({'cards': cards, 'game_state': state}) + + + def try_become_judge(self, player): + if self.state is not self.WAITING_NEW_JUDGE: + # TODO what if the judge has quit ? + return error('Someone is judge already') + + self.judge = player + self.board.reveal_black_card() + + self.state = self.WAITING_COLLECTION + + for p in self.players: + if p is not player: + p.send_notification({'op': 'judge_designed'}) + + return self.try_view_black_card(player) + + + def try_play_card(self, player, card_id): + if self.state is not self.WAITING_COLLECTION: + return error('Who asked you to play now ?!') + + if self.judge is player: + return error('You\'re the judge, you silly') + elif player.get_has_played(): + return error('You already played, you dumb ass') + + try: + card = player.pop_card(card_id) + except IndexError: + return error('Invalid card id') + + player.set_has_played() + + self.board.play_card(player, card) + + self.judge.send_notification({'op': 'card_played'}) + + return success({'card_id': card_id}) + + + def try_collect_cards(self, player): + if self.state is not self.WAITING_COLLECTION: + return error('Do you think it\'s the moment for colletion !?') + + if self.judge is not player: + return error('You\'re not the judge, you fool!') + + self.board.shuffle_played_cards() + + # we prevent the others to play + self.state = self.WAITING_DESIGNATION + + for p in self.players: + if p is not player: + p.send_notification({'op': 'cards_collected'}) + + return self.try_view_played_cards(player) + + + def try_designate_card(self, player, card_id): + if self.state is not self.WAITING_DESIGNATION: + return error('Not now, moron !') + + if self.judge is not player: + return error('Who do you think you are !?') + + if card_id is None and len(self.board.played_cards) > 0: + return error('There are cards on the board, pick one !') + + if card_id is not None or len(self.board.played_cards) > 0: + # if there are cards on the board + # TODO check exception + try: + card, winner = self.board.played_cards[card_id] + except IndexError: + return error('Invalid card') + + winner.inc_score() + + # put the cards back in the deck + self.board.recycle_played_cards() + + # reset the state of the players + for p in self.players: + if p.get_has_played(): + idx = p.receive_card(self.board.pick_white_card()) + card_idx = p.cards[idx] + card_desc = self.white_desc[card_idx] + + p.send_notification({ + 'op': 'received_card', + 'content': { + 'card': { + 'id': idx, + 'desc': card_desc, + }, + }, + }) + p.set_has_played(False) + + self.board.recycle_black_card() + self.judge = None + + for p in self.players: + if p is not player: + p.send_notification({'op': 'judge_needed'}) + + self.state = self.WAITING_NEW_JUDGE + + return success(None) + + def __view_player_cards(self, player): + cards = [] + + for card in player.cards: + cards.append((card, self.white_desc[player.cards[card]])) + + return cards + + def try_view_player_cards(self, player): + return success(self.__view_player_cards(player)) + + def try_view_played_cards(self, player): + if self.state is not self.WAITING_DESIGNATION: + return error('Not now, moron !') + + cards = [] + + for card, unused in self.board.played_cards: + cards.append(self.white_desc[card]) + + return success(cards) + + def try_view_black_card(self, player): + card = self.board.current_black_card + + if card is not None: + return success(self.black_desc[card]) + + return error('The black card has not been revealed yet') + + def disconnect(self, player): + player.client = None + + if self.judge is player: + self.board.recycle_black_card() + self.judge = None + + for p in self.players: + p.send_notification({'op': 'judge_needed'}) + + for card, p in self.board.played_cards: + idx = p.receive_card(card) + card_idx = p.cards[idx] + card_desc = self.white_desc[card_idx] + + p.send_notification({ + 'op': 'received_card', + 'content': { + 'card': { + 'id': idx, + 'desc': card_desc, + }, + }, + }) + p.set_has_played(False) + + self.board.played_cards = [] + self.state = self.WAITING_NEW_JUDGE diff --git a/swiftstory/GameManager.py b/swiftstory/GameManager.py new file mode 100644 index 0000000..7cdb5da --- /dev/null +++ b/swiftstory/GameManager.py @@ -0,0 +1,34 @@ +from swiftstory.Game import Game +from swiftstory.Cards import Cards + +import os + +class GameManager(): + def __init__(self): + self.langs = {} + + for filename in next(os.walk('usr/share/swiftstory/lang'))[1]: + self.langs[filename] = {} + + for lang in self.langs: + self.langs[lang]['black_cards'] = Cards.get_black_cards(lang) + self.langs[lang]['white_cards'] = Cards.get_white_cards(lang) + + self.langs[lang]['games'] = {} + + def join_game(self, game_name, lang): + if self.langs.get(lang) is None: + return None + + games = self.langs[lang]['games'] + black_cards = self.langs[lang]['black_cards'] + white_cards = self.langs[lang]['white_cards'] + + game = games.get(game_name) + + if game is None: + print('Starting new game') + + game = games[game_name] = Game(white_cards, black_cards) + + return game diff --git a/swiftstory/Player.py b/swiftstory/Player.py new file mode 100644 index 0000000..cc64d17 --- /dev/null +++ b/swiftstory/Player.py @@ -0,0 +1,43 @@ +import json + +class Player(): + def __init__(self, client): + self.cards = {} + self.next_idx = 0 + + self.client = client + + self.score = 0 + + self.has_played = False + + self.name = 'default' + + def pop_card(self, card_id): + return self.cards.pop(card_id) + + def get_has_played(self): + return self.has_played + + def set_has_played(self, has=True): + self.has_played = has + + def inc_score(self): + self.score += 1 + self.send_notification({ + 'op': 'updated_score', + 'content': self.score, + }) + + def receive_card(self, card): + self.cards[self.next_idx] = card + self.next_idx += 1 + return self.next_idx - 1 + + def send_notification(self, obj): + if self.client is None: + return + + message = json.dumps({'type': 'notification', 'content': obj}) + + self.client.send_notification(message) diff --git a/swiftstory/Status.py b/swiftstory/Status.py new file mode 100644 index 0000000..4e8c84d --- /dev/null +++ b/swiftstory/Status.py @@ -0,0 +1,7 @@ +import json + +def error(msg, code=255): + return json.dumps({'type': 'response', 'content': {'status': code, 'info': msg}}) + +def success(obj): + return json.dumps({'type': 'response', 'content': {'status': 0, 'result': obj}}) diff --git a/swiftstory/__init__.py b/swiftstory/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/swiftstoryd b/swiftstoryd new file mode 100755 index 0000000..2f5ae36 --- /dev/null +++ b/swiftstoryd @@ -0,0 +1,72 @@ +#!/usr/bin/env python + +from websocket_server import WebsocketServer +import swiftstory.GameManager +import swiftstory.Client +from swiftstory.Status import error + +import json + +game_manager = swiftstory.GameManager.GameManager() + +def new_client_handler(client, server): + client['client'] = swiftstory.Client.Client(server, client, game_manager) + +def client_left_handler(client, server): + client['client'].disconnect(); + +def message_received_handler(client, server, message): + try: + json_msg = json.loads(message) + except: + res = error('badly formatted json') + else: + op = json_msg['op'] + if op == 'join_game': + try: + game_name = json_msg['game_name'] + except KeyError: + res = error('field `game_name\' is required') + else: + lang = json_msg.get('lang') + res = client['client'].join_game(game_name, lang) + elif op == 'view_player_cards': + res = client['client'].view_player_cards() + elif op == 'view_black_card': + res = client['client'].view_black_card() + elif op == 'view_played_cards': + res = client['client'].view_played_cards() + elif op == 'pick_black_card': + res = client['client'].pick_black_card() + elif op == 'designate_card': + card_id = None + try: + card_id = int(json_msg['card_id']) + except (KeyError, TypeError): + pass + finally: + res = client['client'].designate_card(card_id) + elif op == 'play_white_card': + try: + card_id = int(json_msg['card_id']) + except KeyError: + res = error('field `card_id\' is required') + else: + res = client['client'].play_white_card(card_id) + elif op == 'collect_cards': + res = client['client'].collect_cards() + else: + res = error('invalid command') + + server.send_message(client, res) + +def main(): + server = WebsocketServer(1236, '0.0.0.0') + server.set_fn_new_client(new_client_handler) + server.set_fn_client_left(client_left_handler) + server.set_fn_message_received(message_received_handler) + + server.run_forever() + +if __name__ == '__main__': + main() diff --git a/usr/share/cao/lang/en/cards/black b/usr/share/cao/lang/en/cards/black deleted file mode 100644 index 9519bb7..0000000 --- a/usr/share/cao/lang/en/cards/black +++ /dev/null @@ -1,163 +0,0 @@ -2 AM in the city that never sleeps. The door swings open and walks in, legs up to here. Something in her eyes tells me she's looking for ______. -After the earthquake, Sean Penn brought _____ to the people of Haiti. -Alright, bros. Our frat house is condemned, and all the hot slampieces are over at Gamma Phi. The time has come to commence Operation _____. -Alternative medicine is now embracing the curative powers of _____. -And I would have gotten away with it, too, if it hadn't been for _____! -And today's soup is Cream of _____. -And what did you bring for show and tell? -A recent laboratory study shows that undergraduates have 50% less sex after being exposed to _____. -A remarkable new study has shown that chimps have evolved their own primitive version of _____. -Armani suit: $1,000. Dinner for two at a swanky restaurant: $300. The look on her face when you surprise her with _____, priceless. -A romantic candlelit dinner would be incomplete without _____. -As king, how will I keep the peasant's in line? -As part of his contract, Prince won't perform without ______ in his dressing room. -As part of his daily regimen, Anderson Cooper sets aside 15 minutes for _____. -A successful job interview begins with a firm handshake and ends with _____. -_____. Awesome in theory, kind of a mess in practice. -Before I run for president, I must destroy all evidence of my involvement with _____. -_____. Betcha can't have just one! -But before I kill you, Mr. Bond, I must show you _____. -Call the law offices of Goldstein & Goldstein, because no one should have to tolerate _____ in the workplace. -Charades was ruined for me forever when my mom had to act out _____. -Coming to Broadway this season, _____: The Musical. -Daddy, why is mommy crying? -Dear Abby, I'm having some trouble with _____ and would like your advice. -Dear Leader Kim Jong-un, our village praises your infinite wisdom with a humble offering of _____. -Do NOT fuck with me! I am literally _____ right now. -Don't forget! Beginning this week, Casual Friday will officially become "_____ Friday." -Do the Dew with our most extreme flavor yet! Get ready for Mountain Dew _____! -Do you lack energy? Does it sometimes feel like the whole world is _____? Zoloft. -During high school, I never really fit in until I found _____ club. -During his midlife crisis, my dad got really into _____. -During sex, I like to think about _____. -Finally! A service that delivers _____ right to your door. -Fun tip! When your man asks you to go down on him, try surprising him with _____ instead. -Get ready for the movie of the summer! One cop plays by the book. The other's only interested in one thing: _____. -_____: good to the last drop. -Having the worst day EVER. #_____ -Help me doctor, I've got _____ in my butt! -Here at the Academy for Gifted Children, we allow students to explore _____ at their own pace. -Here is the church. Here is the steeple. Open the doors and there is _____. -Hey baby, come back to my place and I'll show you _____. -_____. High five, bro. -Hi MTV! My name is Kendra, I live in Malibu, I'm into _____, and I love to have a good time. -Hi, this Jim from accounting. We noticed a $1,200 charge labeled "_____." Can you explain? -How am I compensating for my tiny penis? -How am I maintaining my relationship status? -How did I lose my virginity? -I do not know with what weapons World War III will be be fought, but World War IV will be fought with _____. -I don't mean to brag, but they call me the Michael Jordan of _____. -I drink to forget _____. -I get by with a little help from _____. -I got 99 problems but _____ ain't one. -I learned the hard way that you can't cheer up a grieving friend with _____. -I'm not like the rest of you, I'm too rich and busy for _____. -I'm pretty sure I'm high right now, because I'm absolutely mesmerized by _____. -I'm sorry, Professor, but I couldn't complete my homework because of _____. -I'm sorry sir, but we don't allow _____ at the country club. -In 1,000 years, when paper money is a distant memory, how will we pay for goods and services? -In his farewell address, George Washington famously warned Americans about the dangers of _____. -In his new action comedy, Jackie Chan must fend off ninjas while also dealing with _____. -In his newest and most difficult stunt, David Blaine must escape from _____. -In his new self-produced album, Kanye West raps over the sounds of _____. -In its new tourism campaign, Detroit proudly proclaims that it has finally eliminated _____. -In L.A. County Jail, word is you can trade 200 cigarettes for _____. -In Rome, there are whisperings that the Vatican has a secret room devoted to _____. -Instead of coal, Santa now gives bad children _____. -In the distant future, historians will agree that _____ marked the beginning of America's decline. -In the new Disney Channel Original Movie, Hannah Montana struggles with _____ for the first time. -In the seventh circle of Hell, sinners must endure _____ for all of eternity. -Introducing Xtreme Baseball! It's like baseball, but with ____! -It lurks in the night. It hungers for flesh. This summer, no one is safe from _____. -It's a pity that kids these days are all involved with _____. -____. It's a trap! -_____: kid-tested, mother-approved. -Life for American Indians was forever changed when the White Man introduced them to _____. -Life's pretty tough in the fast lane. That's why I never leave the house without _____. -Little Miss Muffet Sat on a tuffet, Eating her curds and _____. -Loving' you is easy 'cause you're _____. -Man, this is bullshit. Fuck _____. -Maybe she's born with it. Maybe it's _____. -Members of New York's social elite are paying thousands of dollars just to experience _____. -Money can't buy me love, but it can buy me _____. -MTV's new reality show features eight washed-up celebrities living with _____. -My country, 'tis of thee, sweet land of _____. -My gym teacher got fired for adding _____ to the obstacle course. -My new favorite porn star is Joey "_____" McGee. -My plan for world domination begins with _____. -Next from J.K Rowling: Harry Potter and the Chamber of _____. -Next on ESPN2, the World Series of _____. -Next time on Dr. Phil: How to talk to your child about _____. -Now in bookstores: "The Audacity of _____," by Barack Obama -Only two things in life are certain: death and _____. -Science will never explain _____. -She's up all night for good fun. I'm up all night for _____. -_____. That's how I want to die. -The blind date was going horribly until we discovered our shared interest in _____. -The CIA now interrogates enemy agents by repeatedly subjecting them to _____. -The class field trip was completely ruined by _____. -The Five Stages of Grief: denial, anger, bargaining, _____, acceptance. -The healing process began when I joined a support group for victims of _____. -The Japanese have developed a smaller, more efficient version of _____. -The new Chevy Tahoe. With the power and space to take _____ everywhere you go. -The secret to a lasting marriage is communication, communication, and _____. -The Smithsonian Museum of Natural History has just opened an interactive exhibit on _____. -The socialist governments of Scandinavia have declared that access to _____ is a basic human right. -This is the prime of my life. I'm young, hot, and full of _____. -This is the way the world ends. This is the way the world ends. Not with a bang but with _____. -This is your captain speaking. Fasten your seatbelts and prepare for _____. -This month's Cosmo: "Spice up your sex life by bringing _____ into the bedroom." -Today on Maury: "Help! My son is _____!" -Tonight on 20/20: What you don't know about _____ could kill you. -To prepare for his upcoming role, Daniel Day-Lewis immersed himself in the world of _____. -TSA guidelines now prohibit _____ on airplanes. -Turns out that _____-Man was neither the hero we needed nor wanted. -War! What is it good for? -Well what do you have to say for yourself, Casey? This is the third time you've been sent to the principals office for _____. -Wes Anderson's new film tells the story of a precious child coming to terms with _____. -What am I giving up for Lent? -What are my parents hiding from me? -What brought the orgy to a grinding halt? -What did I bring back from mexico? -What did the U.S. airdrop to the children of Afghanistan? -What did Vin Diesel eat for dinner? -What don't you want to find in your Kung Pao chicken? -What ended my last relationship? -What gets better with age? -What gives me uncontrollable gas? -What has been making life difficult at the nudist colony? -What helps Obama unwind? -What is Batman's guilty pleasure? -What killed my boner? -What left this stain on my couch? -What never fails to liven up the party? -What's a girl's best friend? -What's fun until it gets weird? -What's George W. Bush thinking about right now? -What's making things awkward in the sauna? -What's my anti-drug? -What's my secret power? -What's Teach for America using to inspire inner city students to succeed? -What's that smell? -What's that sound? -What's the gift that keeps on giving? -What's the most emo? -What's the new fad diet? -What's the next happy meal toy? -What's there a ton of in heaven? -What will always get you laid? -What will I bring back in time to convince people that I am a powerful wizard? -What would grandma find disturbing, yet oddly charming? -When all else fails, I can always masturbate to _____. -When I am a billionaire, I shall erect a 50-foot statue to commemorate _____. -When I am President of the United States, I will create the Department of _____. -When I pooped, what came out of my butt? -When Pharaoh remained unmoved, Moses called down a Plague of _____. -White people like _____. -WHOOO! God Damn I love _____! -Why am I broke? -Why am I sticky? -Why can't I sleep at night? -Why do I hurt all over? -Yo' mama so fat she _____! -Your persistence is admirable, my dear Prince. But you cannot win my heart with _____ alone. diff --git a/usr/share/cao/lang/en/cards/white b/usr/share/cao/lang/en/cards/white deleted file mode 100644 index 1c15a42..0000000 --- a/usr/share/cao/lang/en/cards/white +++ /dev/null @@ -1,828 +0,0 @@ -10 Incredible Facts About the Anus. -24-hour media coverage. -40 acres and a mule. -50,000 volts straight to the nipples. -72 virgins. -8 oz. of sweet Mexican black-tar heroin. -A 55-gallon drum of lube. -Aaron Burr. -A bag of magic beans. -A balanced breakfast. -A ball of earwax, semen, and toenail clippings. -A big black dick. -A bigger, blacker dick. -A bitch slap. -A black male in his early 20s, last seen wearing a hoodie. -A bleached asshole. -A bloody pacifier. -A boo-boo. -A Bop It. -A botched circumcision. -A brain tumor. -A bucket of fish heads. -A bunch of idiots playing a card game instead of interacting like normal humans. -A Burmese tiger pit. -A can of whoop-ass. -A cat video so cute that your eyes roll back and your spine slides out of your anus. -A cooler full of organs. -A cop who is also a dog. -A crappy little hand. -A crazy little thing called love. -Active listening. -Actually getting shot, for real. -Actual mutants with medical conditions and no superpowers. -A dance move that's just sex. -Adderall. -A defective condom. -A disappointing birthday party. -A disappointing salad. -A dollop of sour cream. -Advice from a wise, old black man. -A face full of horse cum. -A falcon with a cap on it's head. -A fart. -A fat bald man from the internet. -A fetus. -A Fleshlight. -A for-real lizard that spits blood from it's eyes. -A foul mouth. -Africa. -African children. -A gassy antelope. -A gender identity that can only be conveyed through slam poetry. -A gentle caress of the inner thigh. -A giant powdery manbaby. -A good sniff. -A greased up Matthew McConaughey. -Agriculture. -A homoerotic volleyball montage. -A hopeless amount of spiders. -A horse with no legs. -AIDS. -AIDS monkeys. -A kiss on the lips. -A lamprey swimming up the toilet and latching onto your taint. -Alcoholism. -A lifetime of sadness. -A live studio audience. -All of my friends dying. -All of this blood. -All these decorative pillows. -All the single ladies. -All-you-can-eat shrimp for $4.99. -Almost giving money to a homeless person. -A low standard of living. -Altar boys. -A magic hippie love cloud. -A manhole. -A man in yoga pants with a ponytail and feather earrings. -A man on the brink of orgasm. -A mating display. -Ambiguous sarcasm. -A micropenis. -A micropig wearing a tiny raincoat and booties. -A middle-aged man on roller skates. -A mime having a stroke. -A monkey smoking a cigar. -A mopey zoo lion. -A mouthful of potato salad. -Amputees. -A murder most foul. -Anal beads. -Anal fissures like you wouldn't believe. -An all-midget production of Shakespeare's Richard III. -An army of skeletons. -An ass disaster. -An asymmetric boob job. -A Native American who solves crimes by going into the spirit world. -Ancient Athenian boy-fucking. -Andre the Giant's enormous, leathery scrotum. -An endless stream of diarrhea. -An erection that lasts longer than four hours. -An ether-soaked rag. -An Etsy steampunk strap-on. -An evil man in evil clothes. -Angelheaded hipsters burning for the ancient heavenly connection to the starry dynamo in the machinery of night. -An icepick lobotomy. -An inability to form meaningful relationships. -An interracial handshake. -An M16 assault rifle. -An M. Night Shyamalan plot twist. -An Oedipus complex. -Another shot of morphine. -An oversized lollipop. -A nuanced critique. -An ugly face. -An unforgettable quinceanera. -An unhinged ferris wheel rolling towards the sea. -An uninterrupted history of imperialism and exploitation. -An unstoppable wave of fire ants. -A one-way ticket to Gary, Indiana. -A passionate latino lover. -A pile of squirming bodies. -A pinata full of scorpions. -A plunger to the face. -A powered exoskeleton. -A PowerPoint presentation. -A pyramid of severed heads. -A Quesadilla Explosion Salad from Chili's. -A really cool hat. -A reason not to commit suicide. -A rival dojo. -Arnold Schwarzenegger. -A robust mongoloid. -A sad fat dragon with no friends. -A sad handjob. -A salty surprise. -A sassy black woman. -A sausage festival. -A sea of troubles. -A sex comet from Neptune that plunges the Earth into eternal sexiness. -A sex goblin with a carnival penis. -A shiny rock that proves I love you. -Asians who aren't good at math. -A slightly shittier parallel universe. -A smiling black man, a latina businesswoman, a cool Asian, and some whites. -A snapping turtle biting the tip of your penis. -A sofa that says "I have style, but I like to be comfortable." -A soulful rendition of "Ol' Man River." -A spastic nerd. -A spontaneous conga line. -A squadron of moles wearing aviator goggles. -Assless chaps. -Ass to mouth. -A stray pube. -A subscription to Men's fitness. -A Super Soaker full of cat pee. -A surprising amount of hair. -A sweaty, panting leather daddy. -A sweet spaceship. -A team of lawyers. -A thermonuclear detonation. -A time travel paradox. -A tiny horse. -A tribe of warrior women. -A Ugandan warlord. -Auschwitz. -Authentic Mexican cuisine. -Autocannibalism. -A vagina that leads to another dimension. -A web of lies. -A whole new kind of porn. -A windmill full of corpses. -AXE Body Spray. -A zero-risk way to make $2,000 from home. -A zesty breakfast burrito. -Backwards knees. -Balls. -Barack Obama. -Basic human decency. -BATMAN!!! -Battlefield amputations. -Beefin' over turf. -Bees? -Being a busy adult with many important things to do. -Being a dick to children. -Being a dinosaur. -Being a motherfucking sorcerer. -Being awesome at sex. -Being fabulous. -Being fat and stupid. -Being marginalized. -Being nine years old. -Being on fire. -Being paralyzed from the neck down. -Being rich. -Being worshipped as the one true God. -Bill Clinton, naked on a bearskin rug with a saxophone. -Bill Nye the Science Guy. -Bingeing and purging. -Bio-engineered assault rifles with acid breath. -Bitches. -Blackface. -Black people. -Blackula. -Blood farts. -Blowing some dudes in an alley. -Blowjobs for everyone. -Boogers. -Boring vaginal sex. -Boris the Soviet Love Hammer. -Bosnian chicken farmers. -Bouncing up and down. -Breaking out into song and dance. -Brown people. -Bullshit. -Butt stuff. -Buying the right pants to be cool. -Calculating every mannerism so as to not suggest homosexuality. -Cards Against Humanity. -Carnies. -Catapults. -Catastrophic urethral trauma. -Centaurs. -Chainsaws for hands. -Changing a person's mind with logic and facts. -Cheating in the Special Olympics. -Child abuse. -Child beauty pageants. -Child Protective Services. -Children on leashes. -Child support payments. -Christopher Walken. -Chrystal meth. -Chugging a lava lamp. -Chunks of dead hitchhiker. -Civilian casualties. -Clams. -Classist undertones. -Clenched butt cheeks. -Coat hanger abortions. -Cock. -Committing mid-blowjob. -Concealing a boner. -Consensual sex. -Copping a feel. -Count Chocula. -Court-ordered rehab. -Crazy opium eyes. -Crippling debt. -Crucifixion. -Crumbs all over the god damn carpet. -Crushing Mr. Peanut's brittle body. -Crying into the pages of Sylvia Plath. -Cuddling. -Cutting off a flamingo's legs with garden shears. -Cybernetic enhancements. -Daddy issues. -Daddy's credit card. -Daniel Radcliffe's delicious asshole. -Dark and mysterious forces beyond our control. -Darth Vador. -Dead babies. -Dead parents. -Death by Steven Seagal. -Deez nuts. -Deflowering the princess. -Demonic possession. -Dem titties. -Denzel. -Depression. -Destroying the evidence. -Dick Cheney. -Dick fingers. -Dining with cardboard cutouts of the cast of "Friends." -Disco fever. -Doing the right stuff to her nipples. -Doing the right thing. -Doin' it in the butt. -Domino's Oreo Dessert Pizza. -Doo-doo. -Dorito breath. -Double penetration. -Drinking alone. -Drinking responsibly. -Drinking ten 5-hour ENERGYs to get fifty continuous hours of energy. -Dropping a chandelier on your enemies and riding the rope up. -Dry heaving. -Dying. -Dying alone and in pain. -Dying of dysentery. -Eating an albino. -Eating the last known bison. -Edible underpants. -Ejaculating live bees and bees are angry. -Elderly Japanese men. -Embryonic stem cells. -Emotions. -Ennui. -Enormous Scandinavian women. -Erectile dysfunction. -Estrogen. -Ethnic cleansing. -Eugenics. -Exactly what you'd expect. -Existing. -Expecting a burp and vomiting on the floor. -Exploding pigeons. -Explosions. -Extremely tight pants. -Fabricating statistics. -Falling into the toilet. -Famine. -Fancy Feast. -Farting and walking away. -Fear itself. -Feeding Rosie O'Donnell. -Fetal alcohol syndrome. -Fiery poops. -Figgy pudding. -Figuring out how to have sex with a dolphin. -Filling every orifice with butterscotch pudding. -Finally finishing off the Indians. -Finding Waldo. -Fingering. -Finger painting. -Firing a rifle into the air while balls deep in a squealing hog. -Fisting. -Five-Dollar Footlongs. -Flesh-eating bacteria. -Flightless birds. -Flying robots that kill people. -Flying sex snakes. -Foreskin. -Former President George W. Bush. -Free ice cream, yo. -Free samples. -Friction. -Friendly fire. -Friends with benefits. -Frolicking. -Fucking a corpse back to life. -Fuck Mountain. -Full frontal nudity. -Funky fresh rhymes. -Gandalf. -Gandhi. -Gay aliens. -Geese. -Genetically engineered super-soldiers. -Genghis Khan. -Genghis Khan's DNA. -Genuine human connection. -George Clooney's musk. -German dungeon porn. -Getting abducted by Peter Pan. -Getting caught by the police and going to jail. -Getting drive-by shot. -Getting eaten alive by Guy Fieri. -Getting hilariously gang-banged by the Blue Man Group. -Getting in her pants, politely. -Getting married, having a few kids, buying some cool stuff, retiring to Florida, and dying. -Getting naked and watching Nickelodeon. -Getting really high. -Getting so angry that you pop a boner. -Getting your dick stuck in a Chinese finger trap with another dick. -Ghosts. -Giant sperm from outer space. -Girls that always be texting'. -Giving 110%. -Giving birth to the Antichrist. -Gladiatorial combat. -Gloryholes. -Goblins. -God. -Gogurt. -Going around punching people. -Going to a high school reunion on ketamine. -Grammar nazis who are also regular Nazis. -Grandma. -Grandpa's ashes. -Graphic violence, adult language, and some sexual content. -Grave robbing. -Growing a pair. -Half-assed foreplay. -Harry Potter erotica. -Having anuses for eyes. -Having a penis. -Having been dead for a while. -Having sex on top of a pizza. -Having shotguns for legs. -Heartwarming orphans. -Helplessly giggling at the mention of Hutus and Tutsis. -Her Majesty, Queen Elizabeth II. -Heteronormativity. -Hillary Clinton's death stare. -Hip hop jewels. -Hipsters. -Historically black colleges. -Historical revisionism. -Holding down a child and farting all over him. -Homeless people. -Home video of Oprah sobbing into a Lean Cuisine. -Hope. -Hormone injections. -Horrifying laser removal accidents. -Horse meat. -Hospice care. -Hot cheese. -Hot people. -Hot Pockets. -How awesome I am. -Hurricane Katrina. -Inappropriate yodeling. -Incest. -Indescribable loneliness. -Injecting speed into one arm and horse tranquilizer into the other. -Insatiable bloodlust. -Inserting a mason jar into my anus. -Interspecies marriage. -Intimacy problems. -Invading Poland. -Italians. -Jafar. -Jean-Claude Van Damme in slow motion. -Jeff Goldblum. -Jerking off into a pool of children's tears. -Jewish fraternities. -Jizz. -Jobs. -Joe Biden. -John Wilkes Booth. -Judge Judy. -Jumping out at people. -Justin Bieber. -Just the tip. -Kamikaze pilots. -Kanye West. -Keanu Reeves. -Khakis. -Kids with ass cancer. -Lactation. -Lady Gaga. -Lance Armstrong's missing testicle. -Land mines. -Laying an egg. -Leprosy. -Letting everyone down. -Levelling up. -Licking things to claim them as your own. -Literally eating shit. -Living in a trashcan. -Lockjaw. -Loki, the trickster god. -Lots and lots of abortions. -Lumberjack fantasies. -Lunchables. -Mad hacky-sack skills. -Magnets. -Making a friend. -Making a pouty face. -Making the penises kiss. -Man meat. -Masturbation. -Maximal insertion. -Me. -MechaHitler. -Medieval Times Dinner & Tournament. -Men. -Menstrual rage. -Me time. -Michael Jackson. -Michelle Obama's arms. -Mild autism. -Miley Cyrus at 55. -Moderate to severe joint pain. -Mom. -Moms new boyfriend. -Mooing. -Moral ambiguity. -Morgan Freeman's voice. -Mouth herpes. -Mr. Clean, right behind you. -Mufasa's death scene. -Muhammad (Praise Be Unto Him). -Multiple stab wounds. -Mutually-assured destruction. -My black ass. -My boyfriend's stupid penis. -My collection of high-tech sex toys. -My dad's dumb fucking face. -My dead son's baseball glove. -My first kill. -My first period. -My genitals. -My humps. -My inner demons. -My machete. -My manservant, Claude. -My relationship status. -My sex dungeon. -My sex life. -My soul. -My vagina. -My worthless son. -Natalie Portman. -Natural male enhancement. -Natural selection. -Nazis. -Necrophilia. -Neil Diamond's Greatest Hits. -Neil Patrick Harris. -New Age music. -Nickelback. -Nicolas Cage. -Nipple blades. -No clothes on, penis in vagina. -Not believing in giraffes. -Not contributing to society in any meaningful way. -Not giving a shit about the Third World. -Not having sex. -Nothing. -Not reciprocating oral sex. -Not wearing pants. -Nubile slave boys. -Nunchuck moves. -Object permanence. -Oil! -Old-people smell. -Oncoming traffic. -One Ring to rule them all. -One thousand Slim Jims. -One trillion dollars. -Oompa-Loompas. -Opposable thumbs. -Our first chimpanzee president. -Out-of-this-world bazongos. -Overcompensation. -Overpowering your father. -Pac-Man uncontrollably guzzling cum. -Panda sex. -Party Mexicans. -Passive-aggressive Post-it notes. -Pedophiles. -Peeing a little bit. -Penis breath. -Penis envy. -P.F. Chang himself. -Pictures of boobs. -Pixelated bukkake. -Police brutality. -Pooping back and forth. Forever. -Poopy diapers. -Poor life choices. -Poorly-timed Holocaust jokes. -Poor people. -Power. -Powerful thighs. -Prancing. -Praying the gay away. -Preteens. -Pretending to care. -Pretty Pretty Princess Dress-Up Board Game. -Prince Ali, fabulous he, Ali Ababwa. -Puberty. -Public ridicule. -Pulling out. -Pumping out a baby every nine months. -Puppies! -Putting an entire peanut butter and jelly sandwich into the VCR. -Queefing. -Quiche. -Quivering jowls. -Racially-biased SAT questions. -Racism. -Raptor attacks. -Repression. -Republicans. -Revenge fucking. -Reverse cowgirl. -Riding off into the sunset. -Ripping into a man's chest and pulling out his still-beating heart. -Rising from the grave. -Road head. -Robert Downey, Jr. -RoboCop. -Roland the Farter, flatulist to the king. -Ronald Reagan. -Running naked through a mall, pissing and shitting everywhere. -Running out of semen. -Rush Limbaugh's soft, shitty body. -Russian super-tuberculosis. -Ryan Gosling riding in on a white horse. -Same-sex ice dancing. -Samuel L. Jackson. -Sanding off a man's nose. -Santa Claus. -Sarah Palin. -Savagely beating a mascot. -Saxophone solos. -Saying "I love you." -Science. -Scientology. -Screaming like a maniac. -Scrotal frostbite. -Scrotum tickling. -Sean Connery. -Sean Penn. -Seeing grandma naked. -Seeing my village burned and my family slaughtered before my eyes. -Seeing things from Hitler's perspective. -Self-flagellation. -Self-loathing. -Seppuku. -September 11th, 2001. -Serfdom. -Sexual humiliation. -Sexual peeing. -Sexual Tension. -Sex with Patrick Stewart. -Sexy pillow fights. -Shaft. -Shapeshifters. -Shaquille O'Neal's acting career. -Sharks with legs. -Shiny objects. -Shutting the fuck up. -Silence. -Skeletor. -Slapping a racist old lady. -Slowly easing down onto a cucumber. -Smallpox blankets. -Smegma. -Smoking crack, for instance. -Sneezing, farting and coming at the same time. -Sniffing glue. -Snorting coke off a clown's boner -Social justice warriors with flamethrowers of compassion. -Some douche with an acoustic guitar. -Some god-damn peace and quiet. -Some kind of bird-man. -Some really fucked-up shit. -Some shit-hot guitar licks. -Some sort of Asian. -Soup that is too hot. -Special musical guest, Cher. -Spectacular abs. -Spending lots of money. -Sperm whales. -Spontaneous human combustion. -Sports. -Stalin. -Statistically validated stereotypes. -Stephen Hawking talking dirty. -Stockholm Syndrome. -Stuffing a child's face with Fun Dip until he starts having fun. -Subduing a grizzly bear and making her your wife. -Sudden Poop Explosion Disease. -Sugar madness. -Suicidal thoughts. -Sunshine and rainbows. -Surprise sex! -Sweet, sweet vengeance. -Swiftly achieving orgasm. -Switching to Geico. -Swooping. -Synergistic management solutions. -Syphilitic insanity. -Take-backsies. -Taking off your shirt. -Tasteful sideboob. -Teaching a robot to love. -Teenage pregnancy. -Tentacle porn. -Testicular torsion. -That ass. -The Abercrombie & Fitch lifestyle. -The American Dream. -The Amish. -The art of seduction. -The basic suffering that pervades all of existence. -The Big Bang. -The black half of Barack Obama. -The black Power Ranger. -The Blood of Christ. -The boners of the elderly. -The Boy Scouts of America. -The Care Bear Stare. -The Chinese gymnastics team. -The chronic. -The clitoris. -The complex geopolitical quagmire that is the Middle East. -The cool, refreshing taste of Pepsi. -The day the birds attacked. -The Devil himself. -The economy. -The eight gay warlocks who dictate the rules of fashion. -The entire Internet. -The entire Mormon Tabernacle Choir. -The euphoric rush of strangling a drifter. -The female orgasm. -The folly of man. -The Force. -The four arms of Vishnu. -The gays. -The ghosts of Marlon Brando. -The glass ceiling. -The Great Depression. -The Gulags. -The Hamburglar. -The hardworking mexican. -The Harlem Globetrotters. -The harsh light of day. -The heart of a child. -The hiccups. -The Holy Bible. -The homosexual agenda. -The human body. -The Hustle. -The inevitable death of the universe. -The invisible hand. -The Jews. -The KKK. -The Kool-Aid Man. -The Land of Chocolate. -The light of a billion suns. -The Little Engine That Could. -The Make-A-Wish Foundation. -The mere concept of Applebees. -The milk man. -The miracle of childbirth. -The mixing of the races. -The moist, demanding chasm of his mouth. -The morbidly obese. -The new Radiohead album. -The ooze. -The passage of time. -The Patriarchy. -The peaceful and nonthreatening rise of China. -The penny whistle solo from "My Heart Will Go On." -The pirate's life. -The placenta. -The Pope. -The primal, ball-slapping sex your parents are having right now. -The profoundly handicapped. -The Rapture. -The Rev. Dr. Martin Luther King, Jr. -The rhythms of Africa. -The safe word. -The secret formula for ultimate female satisfaction. -The shambling corpse of Larry King. -The size of my penis. -The South. -The swim team, all at once. -The systematic destruction of an entire people and their way of life. -The Tempur-Pedic Swedish Sleep System. -The terrorists. -The thin veneer of situational casualty that underlies porn. -The Three-Fifths compromise. -The tiger that killed my father. -The tiniest shred of evidence that God is real. -The token minority. -The Trail of Tears. -The true meaning of Christmas. -The Ubermensch. -The unbelievable world of mushrooms. -The Underground Railroad. -The violation of our basic human rights. -The way white people is. -The white half of Barack Obama. -The wonders of the Orient. -The World of Warcraft. -The wrath of Vladimir Putin. -Third base. -This year's mass shooting. -Three consecutive seconds of happiness. -Three dicks at the same time. -Three months in the hole. -Throwing a virgin into a volcano. -Tiny nipples. -Tom Cruise. -Tongue. -Toni Morrison's vagina. -Too much cocaine. -Tripping balls. -Two midgets shitting into a bucket. -Unfathomable stupidity. -Unlimited soup, salad, and breadsticks. -Unquestioning obedience. -Unrelenting genital punishment. -Used panties. -Vegetarian options. -Vehicular manslaughter. -Velcro. -Viagra. -Vietnam flashbacks. -Vigilante justice. -Vigorous jazz hands. -Vikings. -Waiting 'til marriage. -Waking up half-naked in a Denny's parking lot. -Walking in on Dad peeing into mom's mouth. -Weapons-grade plutonium. -Wearing an octopus for a hat. -Wearing glasses and sounding smart. -Western standards of beauty. -Wet dreams. -Whatever a McRib is made of. -What Jesus would do. -When you fart and a little bit comes out. -Whining like a little bitch. -Whipping a disobedient slave. -Whipping it out. -Whispering all sexy. -White-man scalps. -White people. -White privilege. -Wifely duties. -William Shatner. -Winking at old people. -Wiping her butt. -Women in yogurt commercials. -Women's suffrage. -Words, words, words. -World peace. -Yeast. -YOU MUST CONSTRUCT ADDITIONAL PYLONS. -Your weird brother. -Zeus's sexual appetites. diff --git a/usr/share/cao/lang/fr/cards/black b/usr/share/cao/lang/fr/cards/black deleted file mode 100644 index 1298307..0000000 --- a/usr/share/cao/lang/fr/cards/black +++ /dev/null @@ -1,60 +0,0 @@ -Les Etats-Unis ont débuté le parachutage de _____ aux enfants afghans. -La guerre, c'est bien pour quoi? -Qu'est-ce qui m'empêche de dormir? -C'est quoi cette odeur? -Qui a volé les cookies? -Des études prouvent que les rats de laboratoires se déplacent cinquante fois plus vite dans les labyrinthes après avoir été exposés à _____. -Quand j'irai en prison, je cacherai _____ dans mes fesses pour faire de la contrebande. -Si j'étais Président de la République, je créerais le ministère de _____. -Qu'est-ce qui se bonifie avec le temps? -Je bois pour oublier _____. -Qu'ai-je rapporté du Mexique? -La sortie scolaire a été totalement gâchée par _____. -Qu'est ce que vous n'aimeriez pas trouver dans de la nourriture chinoise? -Dans son nouveau film Disney, Hannah Montana affronte _____ pour la toute première fois. -Pendant le sexe, j'aime penser à _____. -A cause de quoi mon slip est-il trempé? -Que me cachent mes parents? -Les Blancs aiment bien _____. -A cause de quoi les terroristes nous détestent-ils autant? -Comme j'aimerais ne pas avoir perdu la notice pour _____. -Désolé les gens, je viens juste de _____. -C'est quoi ce bruit? -Qu'est-ce qu'on peut trouver par milliers au paradis? -Le meilleur ami des filles, c'est _____. -Quel est le plaisir coupable de Batman? -Les psychanalystes s'allarment devant l'émergence de la phobie de _____ chez la plupart de leurs patients. -Quand j'étais petit, j'adorais _____. -Qu'est-ce qui vous fera réussir à coucher à tous les coups? -Quel est le prochain duo super-héros/acolyte? -_____ : Bon jusqu'à la dernière goutte. -Désormais, le Père Noël n'apportera plus du charbon aux vilains enfants mais _____. -Quel est mon super-pouvoir secret? -Pour draguer, il ne faut surtout pas parler de son penchant pour _____. -Que préfère Nicolas Sarkozy? -Qui est le plus aigri? -_____? Il y a une application pour ça. -Pour mon prochain tour de magie, je vais faire sortir _____ du chapeau. -Durant sa période marron (souvent négligée), Picasso peignait beaucoup de tableaux représentant _____. -La médecine reconnaît enfin les pouvoirs thérapeutiques de _____. -_____ : Testé par les enfants, approuvé par les mamans. -Qu'est-ce qui peut aider à maintenir une relation de couple? -La vie était dure pour les hommes des cavernes avant _____. -Ce soir sur M6, Bernard de la Villardière vous propose une enquête exclusive sur _____. -Que sentent les personnes âgées? -Qu'est-ce qui aide Barack Obama à se changer les idées? -Il mange quoi vin Diesel au petit déjeuner? -Qu'est-ce que mamie trouve d'abord perturbant, puis étrangement plaisant? -_____. C'est un piège. -Quel est le prochain jouet du HappyMeal? -Si j'étais riche, je ferais ériger une statue de 15 mètres de haut pour commémorer _____. -Mais avant de vous tuer, Mr Bond, je dois vous montrer _____. -Ce soir sur Canal+ découvrez la tragique histoire de _____. -Qu'est-ce qui me donne des gaz incontrôlables? -Qu'est-ce qui est le plus hardcore? -Qu'est-ce qui est le plus gay? -Alors que les USA et l'URSS s'affrontaient dans la course à l'espace, le Mexique dépensait des millions de pesos dans la recherche sur _____. -Alors que Pharaon restait impassible Moise provoqua la onzième plaie : _____. -Je ne sais pas avec quelles armes se fera la Troisième Guerre Mondiale, mais la Quatrième se fera à coups de _____. -La dernière chose à laquelle pensa Michael Jackson avant de mourir fut _____. -Des ethnographes ont récemment découvert une tribu aborigène vouant un culte à _____. diff --git a/usr/share/cao/lang/fr/cards/white b/usr/share/cao/lang/fr/cards/white deleted file mode 100644 index b3766a7..0000000 --- a/usr/share/cao/lang/fr/cards/white +++ /dev/null @@ -1,396 +0,0 @@ -La Sainte Bible. -La Macarena. -Se chier dessus. -Un anus maquillé. -Les juifs avec une coupe afro. -Les P'tits Filous Tubes. -Une branlette tristement exécutée. -François Ba Des biscuits apéro. -Michaël Jackson -BATMAN!!! -Les Vikings. -L'abstinence. -Le bibendum Michelin. -Superbus. -Son Altesse royale, la reine Elizabeth II. -L'auto-cannibalisme. -La série des "Fais-moi peur !" -Le ping pong de caca cul à cul. -Pour toujours. -La fête du slip. -Mes parties génitales. -L'inceste. -L'Amérique. -Les chansons de Pascal Obispo. -Un twist de M. Night Shyamalan. -Mourir de la dysenterie. -Les équipes chinoises de gynmastique. -Du sexe surprise ! -Batifoler. -Une tortue vicieuse qui te mord la bite. -Le lancer de nain sur une cible en velcro. -2 Girls 1 Cup (vidéo scatophile célèbre sur Internet). -La tension sexuelle. -Une fête d'anniversaire ratée. -Du Axe Body Spray. -Des bébés chiens ! -Les gens qui sentent leurs chaussettes. -La destruction mutuelle assurée. -Le Ku Klux Klan. -Boire tout seul. -Des abdominaux spectaculaires. -Faire le bon choix. -Du sperme de baleine. -Les inondations. -Center Park. -Les Oompas Loompas. -La capacité d'écoute. -Se mettre tellement en colère que ça en donne une érection. -Les Juifs. -Les cols portés relevés. -World of Warcraft. -Faire la moue. -Gargamel. -Les Twinkies. -Le Stade de France. -Etre un sale con envers les enfants. -Des salopes. -Les enfants tenus en laisse. -Laisser un message maladroit sur un répondeur. -Beaucoup de bruit pour rien. -Les Noirs. -La lactation. -Natalie Portman. -Britney Spears à 55 ans. -Les Jazz Hands. -Une fanfic érotique sur l'univers de Harry Potter. -Les existentialistes. -La science. -Une mycose. -Chier dans la soupe. -La puberté. -Le Pape. -Abuser des cabines de bronzage. -Les tétraplégiques. -Un cinquantenaire qui pratique le roller. -Se retirer. -Brouter. -Péter et s'en aller. -Parkinson. -Auschwitz. -Des chèvres qui mangent des sacs poubelle. -Boire un verre de beurre fondu. -La couille manquante de Lance Armstrong. -Le faire dans les fesses. -La séduction. -Les Jonas Brothers. -La sexualité des pandas. -Un chameau en dessin animé qui apprécie une délicieuse et rafraichissante taffe de cigarette. -Respirer de la colle. -Les sites de rencontres échangistes. -Les exercices pour stimuler l'esprit d'équipe en entreprise. -Plus Belle La Vie. -Se torcher. -L'impuissance. -Un tir dans son propre camp. -Les solos de saxophone. -Un énième film de vampires. -La kétamine. -Les oestrogènes. -Le Sud. -Manger pour pouvoir vomir. -Un bulot. -Des catapultes. -Un burrito très pimenté. -Les filles à qui l'alcool ne réussit pas. -Des gobelins. -La Scientologie. -Nicolas Cage. -Une torsion musculaire. -La chair humaine. -La revente de cadeau sur eBay. -Une vidéo amateur de Claire Chazal qui sanglote au dessus d'un plat surgelé. -Les chapeaux à hélices. -Où sont les toilettes ? -Les Hot Pockets. -Des pilotes kamikazes. -La lèpre. -Les concours de beauté pour enfants. -Les pantalons fendus en cuir des motards et des cowboys. -Des oeufs de ptérodactyles. -Des couvertures avec la variole. -Le sexe oral non réciproque. -Des sucettes géantes. -Gandhi. -Les soutifs lance-flammes. -Le Viagra. -Dr. Martin Luther King Jr. -Sean Penn. -Keanu Reeves. -L'esclavage. -Genghis Khan. -Corky. -Un gardien de but. -Des oies. -Des refaits asymétriques. -Les hommes. -La bestialité. -Ce putain de jeu. -Le Médiator. -Des Chuppa Chups. -Will Smith. -La peluche "Elmo chatouille-moi". -Les couteaux à cran d'arrêt. -Des enfants avec un cancer du colon. -Des pankakes. -Céline Dion. -Une canette de Red Bull. -Le sang du Christ. -Ta mère qui me demande en ami sur Facebook. -Les gens en chaleur. -Les profs remplaçants. -Une parade nuptiale. -Avoir un calcul rénal. -La bagarre. -Jamie de C'est Pas Sorcier. -Les piercings sur les parties génitales. -Les témoins de Jéhovah. -Les roux. -Sarah Palin. -L'agriculture. -Le tri sélectif. -Les pornos SM allemands. -Un terroriste qui fait des vannes. -Une fusillade dans un lycée. -L'avortement au cintre. -Le caca qui brule. -Mon statut relationnel. -Doigter. -Le SIDA. -Valérie Damidot. -Les rabat-joies. -Une lobotomie au pic à glace. -Un type louche en imperméable qui traine devant les écoles primaires. -Les chinois. -Un caniche nain. -Les trous dans les cloisons des WC sur les aires d'autoroutes (glory holes). -Louragan Katrina. -Les Oreos. -Les Nazis. -Les femmes dans les pubs de yaourts. -Les règles abondantes. -Les Frolics. -Les mines antipersonnel. -Une maison de retraite. -Le placenta. -Bono. -Justin Bieber. -La nécrophilie. -Un prépuce. -Indochine. -Le Big Bang. -Bob l'éponge. -Ma collection de sex-toys high-tech. -La guérison par la foi. -Mon âme. -Aller à la messe de minuit. -Les connards sur leur iPhone 4S. -La répression. -Improviser un dispositif à base d'explosifs. -Draguer des personnes âgées. -Les éjaculations nocturnes. -Heath Ledger. -Les personnes âgées japonaises. -La Valse des Fleurs. -Une fellation au volant. -Les fatasmes sur les bucherons. -Un téton qui sort du soutien-gorge. -Les bébés morts. -Etre en feu. -La masturbation. -Le triangle des Bermudes. -Un océan de troubles. -La sélection naturelle. -Des parents morts. -Les Italiens. -Tom Cruise. -La chevalerie. -Les jeux vidéo en réseau. -Le clitoris. -Les mangas pornos avec tentacules. -Mahomet. -Un gros ventre fendu qui ressemble à un cul. -La maltraitance sur mineur. -Toucher des organes génitaux par inadvertance. -Super Mario qui vient réparer une fuite dans un film porno. -Le Télétubbie qui fait le plus gay des quatre. -Les amis qui bouffent tous vos biscuits. -Paris Hilton. -Un mime qui fait une attaque. -Twitter. -Des préléminaires laborieux. -Un moment à soi. -Des gants en latex. -Porter des sous-vêtements à l'envers pour éviter de faire une machine. -Des crevettes à volonté pour 4.99$ -Des échantillons gratuits. -Du kloug. -Un poil pubien abandonné. -Attendre jusqu'au mariage. -Cette réponse est post-moderne. -Un Tamagotchi négligé. -Les décolletés élégants. -Des travestis potables. -Arnold Schwarzenegger. -Piller des tombes. -Un pistolet à eau rempli de pipi de chat. -D'Artagnan. -Ronald McDonald. -Se donner à 110%. -Nourrir Laurence Boccolini. -Un coup d'oeil. -De multiples coups de couteau. -Casimir. -Le meurtre le plus immonde. -Le périnée. -Ouvrir la Mer Rouge. -Trop de gel dans les cheveux. -Les vidéos porno hardcore. -Les sous-vêtements comestibles. -Les Blancs. -Tiger Woods. -Descendre en piqué. -Coucher avec elle. -Les chants tyroliens dans les moments innappropriés. -K2000. -Les fantômes. -Un plan cul. -L'intrigue d'un film de Michael Bay. -La folie des hommes. -Un chapeau vraiment très cool. -La musique pop turque. -Robert Downey Jr. -Nicolas Hulot. -Cacher une érection. -L'herpès buccal. -Le comportement passif agressif. -Deux nains qui chient dans un sceau. -Les pré-adolescentes. -Hippo Gloutons. -Kayne West. -Vomir sans vomi. -Eric Zemmour. -Les sans-abris. -Coco, le singe des Coco Pops. -Les échanges de politesse. -Des boules. -Le nettoyage ethnique. -Le truc du Télé Achat qui électrocute les abdominaux. -La gastro. -Des centaures. -Un uppercut. -Les nains. -Quand tu pètes et que ça fait un léger bruit. -Enlever ton t-shirt. -Monsieur Patate. -Un foetus. -Des blagues sur l'Holocauste au moment inopportun. -Un spectacle de marionnettes. -Les pets vaginaux. -Un Sunday Caramel. -Des abeilles ? -Le droit de vote aux femmes. -Bond, James Bond. -De la pâtée pour chat. -Le pudding à la figue. -Le soleil qui brille et les arcs en ciel. -Le réchauffement planétaire. -Boire de la bière en faisant le poirier sur le tonneau. -La règle de trois. -Porter des moufles. -Etre fabuleux. -Buzz l'Eclair qui explique le sexe au enfants. -Manger tous les cookies qu'on devait vendre à la kermesse. -Les émotions. -Du thon en boite avec des bouts de dauphins. -Tricher aux Jeux Olympiques Spéciaux (réservés aux handicapés mentaux). -Une attaque de vélociraptors. -Une course à la mort en fauteuil roulant. -L'attitude. -Les surdoués en mathématiques. -Les boules anales. -Les joueurs de djembé amateurs. -Un moulin à vent rempli de cadavres. -Hulk Hogan. -Le smegma. -Des pédophiles. -Scalper. -Porter des semelles compensées. -La Gestapo. -La torture par l'eau. -Les chorégraphies disco. -Chuck Norris qui casse de la lesbienne antisémite. -La Heineken. -Un micropénis. -Les oiseaux qui ne savent pas voler. -Braquer une banque du sperme. -Les quotas pour les minorités. -Un complexe d'Oedipe -Les combats de coqs. -La carrière musicale de Tony Parker. -Ma vie sexuelle. -Julien Lepers. -Se saouler au bain de bouche. -La maladie de la vache folle. -Hara-kiri. -Piéger votre maison par peur des voleurs. -Le patinage artistique en duo non mixte. -Dark Vador. -Voldemort. -Lécher les choses pour prouver qu'elles sont à vous. -Nicolas Sarkozy. -La Gay Pride. -La combustion spontanée. -Barack Obama. -Apprendre à un robot à aimer. -Sean Connery. -La paix mondiale. -La dépression nerveuse. -Les amputés. -Une mama black en colère. -Les Talibans. -Le coeur d'un enfant. -Etre riche. -Des bananes en pyjamas. -Se gratter le cul ni vu ni connu. -Les golden showers (pratique urophile). -Des victimes civiles. -Une érection qui dure plus de quatre heures. -Ces moments où vous avez du sable dans le vagin. -Se pavaner. -L'obésité. -Les gays. -Les petits chanteurs à la croix de bois. -Faire un petit pipi. -Mourir. -Essayer de pécho de la meuf à la sortie des cliniques d'avortement. -Les asiatiques qui ne sont pas bons en maths. -Les garçons qui n'appellent pas. -L'odeur des vieux. -Un singe qui fume le cigare. -Une détonation thermonucléaire. -Kim Jong II. -Faire un câlin. -La vieille qui joue dans Arabesques. -La diarrhée des lendemains de fêtes arrosées. -L'alcoolisme. -Le racisme. -Le catéchisme. -Les préservatifs parfumés. -Se réveiller à moitié nu sur le parking du McDo. -Le vagin de Whoopi Goldberg. -Monsieur Propre. -Les pauvres. -L'envie de pénis. -Les Mexicains qui travaillent dur. -Douce, douce vengeance... diff --git a/usr/share/swiftstory/lang/en/cards/black b/usr/share/swiftstory/lang/en/cards/black new file mode 100644 index 0000000..9519bb7 --- /dev/null +++ b/usr/share/swiftstory/lang/en/cards/black @@ -0,0 +1,163 @@ +2 AM in the city that never sleeps. The door swings open and walks in, legs up to here. Something in her eyes tells me she's looking for ______. +After the earthquake, Sean Penn brought _____ to the people of Haiti. +Alright, bros. Our frat house is condemned, and all the hot slampieces are over at Gamma Phi. The time has come to commence Operation _____. +Alternative medicine is now embracing the curative powers of _____. +And I would have gotten away with it, too, if it hadn't been for _____! +And today's soup is Cream of _____. +And what did you bring for show and tell? +A recent laboratory study shows that undergraduates have 50% less sex after being exposed to _____. +A remarkable new study has shown that chimps have evolved their own primitive version of _____. +Armani suit: $1,000. Dinner for two at a swanky restaurant: $300. The look on her face when you surprise her with _____, priceless. +A romantic candlelit dinner would be incomplete without _____. +As king, how will I keep the peasant's in line? +As part of his contract, Prince won't perform without ______ in his dressing room. +As part of his daily regimen, Anderson Cooper sets aside 15 minutes for _____. +A successful job interview begins with a firm handshake and ends with _____. +_____. Awesome in theory, kind of a mess in practice. +Before I run for president, I must destroy all evidence of my involvement with _____. +_____. Betcha can't have just one! +But before I kill you, Mr. Bond, I must show you _____. +Call the law offices of Goldstein & Goldstein, because no one should have to tolerate _____ in the workplace. +Charades was ruined for me forever when my mom had to act out _____. +Coming to Broadway this season, _____: The Musical. +Daddy, why is mommy crying? +Dear Abby, I'm having some trouble with _____ and would like your advice. +Dear Leader Kim Jong-un, our village praises your infinite wisdom with a humble offering of _____. +Do NOT fuck with me! I am literally _____ right now. +Don't forget! Beginning this week, Casual Friday will officially become "_____ Friday." +Do the Dew with our most extreme flavor yet! Get ready for Mountain Dew _____! +Do you lack energy? Does it sometimes feel like the whole world is _____? Zoloft. +During high school, I never really fit in until I found _____ club. +During his midlife crisis, my dad got really into _____. +During sex, I like to think about _____. +Finally! A service that delivers _____ right to your door. +Fun tip! When your man asks you to go down on him, try surprising him with _____ instead. +Get ready for the movie of the summer! One cop plays by the book. The other's only interested in one thing: _____. +_____: good to the last drop. +Having the worst day EVER. #_____ +Help me doctor, I've got _____ in my butt! +Here at the Academy for Gifted Children, we allow students to explore _____ at their own pace. +Here is the church. Here is the steeple. Open the doors and there is _____. +Hey baby, come back to my place and I'll show you _____. +_____. High five, bro. +Hi MTV! My name is Kendra, I live in Malibu, I'm into _____, and I love to have a good time. +Hi, this Jim from accounting. We noticed a $1,200 charge labeled "_____." Can you explain? +How am I compensating for my tiny penis? +How am I maintaining my relationship status? +How did I lose my virginity? +I do not know with what weapons World War III will be be fought, but World War IV will be fought with _____. +I don't mean to brag, but they call me the Michael Jordan of _____. +I drink to forget _____. +I get by with a little help from _____. +I got 99 problems but _____ ain't one. +I learned the hard way that you can't cheer up a grieving friend with _____. +I'm not like the rest of you, I'm too rich and busy for _____. +I'm pretty sure I'm high right now, because I'm absolutely mesmerized by _____. +I'm sorry, Professor, but I couldn't complete my homework because of _____. +I'm sorry sir, but we don't allow _____ at the country club. +In 1,000 years, when paper money is a distant memory, how will we pay for goods and services? +In his farewell address, George Washington famously warned Americans about the dangers of _____. +In his new action comedy, Jackie Chan must fend off ninjas while also dealing with _____. +In his newest and most difficult stunt, David Blaine must escape from _____. +In his new self-produced album, Kanye West raps over the sounds of _____. +In its new tourism campaign, Detroit proudly proclaims that it has finally eliminated _____. +In L.A. County Jail, word is you can trade 200 cigarettes for _____. +In Rome, there are whisperings that the Vatican has a secret room devoted to _____. +Instead of coal, Santa now gives bad children _____. +In the distant future, historians will agree that _____ marked the beginning of America's decline. +In the new Disney Channel Original Movie, Hannah Montana struggles with _____ for the first time. +In the seventh circle of Hell, sinners must endure _____ for all of eternity. +Introducing Xtreme Baseball! It's like baseball, but with ____! +It lurks in the night. It hungers for flesh. This summer, no one is safe from _____. +It's a pity that kids these days are all involved with _____. +____. It's a trap! +_____: kid-tested, mother-approved. +Life for American Indians was forever changed when the White Man introduced them to _____. +Life's pretty tough in the fast lane. That's why I never leave the house without _____. +Little Miss Muffet Sat on a tuffet, Eating her curds and _____. +Loving' you is easy 'cause you're _____. +Man, this is bullshit. Fuck _____. +Maybe she's born with it. Maybe it's _____. +Members of New York's social elite are paying thousands of dollars just to experience _____. +Money can't buy me love, but it can buy me _____. +MTV's new reality show features eight washed-up celebrities living with _____. +My country, 'tis of thee, sweet land of _____. +My gym teacher got fired for adding _____ to the obstacle course. +My new favorite porn star is Joey "_____" McGee. +My plan for world domination begins with _____. +Next from J.K Rowling: Harry Potter and the Chamber of _____. +Next on ESPN2, the World Series of _____. +Next time on Dr. Phil: How to talk to your child about _____. +Now in bookstores: "The Audacity of _____," by Barack Obama +Only two things in life are certain: death and _____. +Science will never explain _____. +She's up all night for good fun. I'm up all night for _____. +_____. That's how I want to die. +The blind date was going horribly until we discovered our shared interest in _____. +The CIA now interrogates enemy agents by repeatedly subjecting them to _____. +The class field trip was completely ruined by _____. +The Five Stages of Grief: denial, anger, bargaining, _____, acceptance. +The healing process began when I joined a support group for victims of _____. +The Japanese have developed a smaller, more efficient version of _____. +The new Chevy Tahoe. With the power and space to take _____ everywhere you go. +The secret to a lasting marriage is communication, communication, and _____. +The Smithsonian Museum of Natural History has just opened an interactive exhibit on _____. +The socialist governments of Scandinavia have declared that access to _____ is a basic human right. +This is the prime of my life. I'm young, hot, and full of _____. +This is the way the world ends. This is the way the world ends. Not with a bang but with _____. +This is your captain speaking. Fasten your seatbelts and prepare for _____. +This month's Cosmo: "Spice up your sex life by bringing _____ into the bedroom." +Today on Maury: "Help! My son is _____!" +Tonight on 20/20: What you don't know about _____ could kill you. +To prepare for his upcoming role, Daniel Day-Lewis immersed himself in the world of _____. +TSA guidelines now prohibit _____ on airplanes. +Turns out that _____-Man was neither the hero we needed nor wanted. +War! What is it good for? +Well what do you have to say for yourself, Casey? This is the third time you've been sent to the principals office for _____. +Wes Anderson's new film tells the story of a precious child coming to terms with _____. +What am I giving up for Lent? +What are my parents hiding from me? +What brought the orgy to a grinding halt? +What did I bring back from mexico? +What did the U.S. airdrop to the children of Afghanistan? +What did Vin Diesel eat for dinner? +What don't you want to find in your Kung Pao chicken? +What ended my last relationship? +What gets better with age? +What gives me uncontrollable gas? +What has been making life difficult at the nudist colony? +What helps Obama unwind? +What is Batman's guilty pleasure? +What killed my boner? +What left this stain on my couch? +What never fails to liven up the party? +What's a girl's best friend? +What's fun until it gets weird? +What's George W. Bush thinking about right now? +What's making things awkward in the sauna? +What's my anti-drug? +What's my secret power? +What's Teach for America using to inspire inner city students to succeed? +What's that smell? +What's that sound? +What's the gift that keeps on giving? +What's the most emo? +What's the new fad diet? +What's the next happy meal toy? +What's there a ton of in heaven? +What will always get you laid? +What will I bring back in time to convince people that I am a powerful wizard? +What would grandma find disturbing, yet oddly charming? +When all else fails, I can always masturbate to _____. +When I am a billionaire, I shall erect a 50-foot statue to commemorate _____. +When I am President of the United States, I will create the Department of _____. +When I pooped, what came out of my butt? +When Pharaoh remained unmoved, Moses called down a Plague of _____. +White people like _____. +WHOOO! God Damn I love _____! +Why am I broke? +Why am I sticky? +Why can't I sleep at night? +Why do I hurt all over? +Yo' mama so fat she _____! +Your persistence is admirable, my dear Prince. But you cannot win my heart with _____ alone. diff --git a/usr/share/swiftstory/lang/en/cards/white b/usr/share/swiftstory/lang/en/cards/white new file mode 100644 index 0000000..1c15a42 --- /dev/null +++ b/usr/share/swiftstory/lang/en/cards/white @@ -0,0 +1,828 @@ +10 Incredible Facts About the Anus. +24-hour media coverage. +40 acres and a mule. +50,000 volts straight to the nipples. +72 virgins. +8 oz. of sweet Mexican black-tar heroin. +A 55-gallon drum of lube. +Aaron Burr. +A bag of magic beans. +A balanced breakfast. +A ball of earwax, semen, and toenail clippings. +A big black dick. +A bigger, blacker dick. +A bitch slap. +A black male in his early 20s, last seen wearing a hoodie. +A bleached asshole. +A bloody pacifier. +A boo-boo. +A Bop It. +A botched circumcision. +A brain tumor. +A bucket of fish heads. +A bunch of idiots playing a card game instead of interacting like normal humans. +A Burmese tiger pit. +A can of whoop-ass. +A cat video so cute that your eyes roll back and your spine slides out of your anus. +A cooler full of organs. +A cop who is also a dog. +A crappy little hand. +A crazy little thing called love. +Active listening. +Actually getting shot, for real. +Actual mutants with medical conditions and no superpowers. +A dance move that's just sex. +Adderall. +A defective condom. +A disappointing birthday party. +A disappointing salad. +A dollop of sour cream. +Advice from a wise, old black man. +A face full of horse cum. +A falcon with a cap on it's head. +A fart. +A fat bald man from the internet. +A fetus. +A Fleshlight. +A for-real lizard that spits blood from it's eyes. +A foul mouth. +Africa. +African children. +A gassy antelope. +A gender identity that can only be conveyed through slam poetry. +A gentle caress of the inner thigh. +A giant powdery manbaby. +A good sniff. +A greased up Matthew McConaughey. +Agriculture. +A homoerotic volleyball montage. +A hopeless amount of spiders. +A horse with no legs. +AIDS. +AIDS monkeys. +A kiss on the lips. +A lamprey swimming up the toilet and latching onto your taint. +Alcoholism. +A lifetime of sadness. +A live studio audience. +All of my friends dying. +All of this blood. +All these decorative pillows. +All the single ladies. +All-you-can-eat shrimp for $4.99. +Almost giving money to a homeless person. +A low standard of living. +Altar boys. +A magic hippie love cloud. +A manhole. +A man in yoga pants with a ponytail and feather earrings. +A man on the brink of orgasm. +A mating display. +Ambiguous sarcasm. +A micropenis. +A micropig wearing a tiny raincoat and booties. +A middle-aged man on roller skates. +A mime having a stroke. +A monkey smoking a cigar. +A mopey zoo lion. +A mouthful of potato salad. +Amputees. +A murder most foul. +Anal beads. +Anal fissures like you wouldn't believe. +An all-midget production of Shakespeare's Richard III. +An army of skeletons. +An ass disaster. +An asymmetric boob job. +A Native American who solves crimes by going into the spirit world. +Ancient Athenian boy-fucking. +Andre the Giant's enormous, leathery scrotum. +An endless stream of diarrhea. +An erection that lasts longer than four hours. +An ether-soaked rag. +An Etsy steampunk strap-on. +An evil man in evil clothes. +Angelheaded hipsters burning for the ancient heavenly connection to the starry dynamo in the machinery of night. +An icepick lobotomy. +An inability to form meaningful relationships. +An interracial handshake. +An M16 assault rifle. +An M. Night Shyamalan plot twist. +An Oedipus complex. +Another shot of morphine. +An oversized lollipop. +A nuanced critique. +An ugly face. +An unforgettable quinceanera. +An unhinged ferris wheel rolling towards the sea. +An uninterrupted history of imperialism and exploitation. +An unstoppable wave of fire ants. +A one-way ticket to Gary, Indiana. +A passionate latino lover. +A pile of squirming bodies. +A pinata full of scorpions. +A plunger to the face. +A powered exoskeleton. +A PowerPoint presentation. +A pyramid of severed heads. +A Quesadilla Explosion Salad from Chili's. +A really cool hat. +A reason not to commit suicide. +A rival dojo. +Arnold Schwarzenegger. +A robust mongoloid. +A sad fat dragon with no friends. +A sad handjob. +A salty surprise. +A sassy black woman. +A sausage festival. +A sea of troubles. +A sex comet from Neptune that plunges the Earth into eternal sexiness. +A sex goblin with a carnival penis. +A shiny rock that proves I love you. +Asians who aren't good at math. +A slightly shittier parallel universe. +A smiling black man, a latina businesswoman, a cool Asian, and some whites. +A snapping turtle biting the tip of your penis. +A sofa that says "I have style, but I like to be comfortable." +A soulful rendition of "Ol' Man River." +A spastic nerd. +A spontaneous conga line. +A squadron of moles wearing aviator goggles. +Assless chaps. +Ass to mouth. +A stray pube. +A subscription to Men's fitness. +A Super Soaker full of cat pee. +A surprising amount of hair. +A sweaty, panting leather daddy. +A sweet spaceship. +A team of lawyers. +A thermonuclear detonation. +A time travel paradox. +A tiny horse. +A tribe of warrior women. +A Ugandan warlord. +Auschwitz. +Authentic Mexican cuisine. +Autocannibalism. +A vagina that leads to another dimension. +A web of lies. +A whole new kind of porn. +A windmill full of corpses. +AXE Body Spray. +A zero-risk way to make $2,000 from home. +A zesty breakfast burrito. +Backwards knees. +Balls. +Barack Obama. +Basic human decency. +BATMAN!!! +Battlefield amputations. +Beefin' over turf. +Bees? +Being a busy adult with many important things to do. +Being a dick to children. +Being a dinosaur. +Being a motherfucking sorcerer. +Being awesome at sex. +Being fabulous. +Being fat and stupid. +Being marginalized. +Being nine years old. +Being on fire. +Being paralyzed from the neck down. +Being rich. +Being worshipped as the one true God. +Bill Clinton, naked on a bearskin rug with a saxophone. +Bill Nye the Science Guy. +Bingeing and purging. +Bio-engineered assault rifles with acid breath. +Bitches. +Blackface. +Black people. +Blackula. +Blood farts. +Blowing some dudes in an alley. +Blowjobs for everyone. +Boogers. +Boring vaginal sex. +Boris the Soviet Love Hammer. +Bosnian chicken farmers. +Bouncing up and down. +Breaking out into song and dance. +Brown people. +Bullshit. +Butt stuff. +Buying the right pants to be cool. +Calculating every mannerism so as to not suggest homosexuality. +Cards Against Humanity. +Carnies. +Catapults. +Catastrophic urethral trauma. +Centaurs. +Chainsaws for hands. +Changing a person's mind with logic and facts. +Cheating in the Special Olympics. +Child abuse. +Child beauty pageants. +Child Protective Services. +Children on leashes. +Child support payments. +Christopher Walken. +Chrystal meth. +Chugging a lava lamp. +Chunks of dead hitchhiker. +Civilian casualties. +Clams. +Classist undertones. +Clenched butt cheeks. +Coat hanger abortions. +Cock. +Committing mid-blowjob. +Concealing a boner. +Consensual sex. +Copping a feel. +Count Chocula. +Court-ordered rehab. +Crazy opium eyes. +Crippling debt. +Crucifixion. +Crumbs all over the god damn carpet. +Crushing Mr. Peanut's brittle body. +Crying into the pages of Sylvia Plath. +Cuddling. +Cutting off a flamingo's legs with garden shears. +Cybernetic enhancements. +Daddy issues. +Daddy's credit card. +Daniel Radcliffe's delicious asshole. +Dark and mysterious forces beyond our control. +Darth Vador. +Dead babies. +Dead parents. +Death by Steven Seagal. +Deez nuts. +Deflowering the princess. +Demonic possession. +Dem titties. +Denzel. +Depression. +Destroying the evidence. +Dick Cheney. +Dick fingers. +Dining with cardboard cutouts of the cast of "Friends." +Disco fever. +Doing the right stuff to her nipples. +Doing the right thing. +Doin' it in the butt. +Domino's Oreo Dessert Pizza. +Doo-doo. +Dorito breath. +Double penetration. +Drinking alone. +Drinking responsibly. +Drinking ten 5-hour ENERGYs to get fifty continuous hours of energy. +Dropping a chandelier on your enemies and riding the rope up. +Dry heaving. +Dying. +Dying alone and in pain. +Dying of dysentery. +Eating an albino. +Eating the last known bison. +Edible underpants. +Ejaculating live bees and bees are angry. +Elderly Japanese men. +Embryonic stem cells. +Emotions. +Ennui. +Enormous Scandinavian women. +Erectile dysfunction. +Estrogen. +Ethnic cleansing. +Eugenics. +Exactly what you'd expect. +Existing. +Expecting a burp and vomiting on the floor. +Exploding pigeons. +Explosions. +Extremely tight pants. +Fabricating statistics. +Falling into the toilet. +Famine. +Fancy Feast. +Farting and walking away. +Fear itself. +Feeding Rosie O'Donnell. +Fetal alcohol syndrome. +Fiery poops. +Figgy pudding. +Figuring out how to have sex with a dolphin. +Filling every orifice with butterscotch pudding. +Finally finishing off the Indians. +Finding Waldo. +Fingering. +Finger painting. +Firing a rifle into the air while balls deep in a squealing hog. +Fisting. +Five-Dollar Footlongs. +Flesh-eating bacteria. +Flightless birds. +Flying robots that kill people. +Flying sex snakes. +Foreskin. +Former President George W. Bush. +Free ice cream, yo. +Free samples. +Friction. +Friendly fire. +Friends with benefits. +Frolicking. +Fucking a corpse back to life. +Fuck Mountain. +Full frontal nudity. +Funky fresh rhymes. +Gandalf. +Gandhi. +Gay aliens. +Geese. +Genetically engineered super-soldiers. +Genghis Khan. +Genghis Khan's DNA. +Genuine human connection. +George Clooney's musk. +German dungeon porn. +Getting abducted by Peter Pan. +Getting caught by the police and going to jail. +Getting drive-by shot. +Getting eaten alive by Guy Fieri. +Getting hilariously gang-banged by the Blue Man Group. +Getting in her pants, politely. +Getting married, having a few kids, buying some cool stuff, retiring to Florida, and dying. +Getting naked and watching Nickelodeon. +Getting really high. +Getting so angry that you pop a boner. +Getting your dick stuck in a Chinese finger trap with another dick. +Ghosts. +Giant sperm from outer space. +Girls that always be texting'. +Giving 110%. +Giving birth to the Antichrist. +Gladiatorial combat. +Gloryholes. +Goblins. +God. +Gogurt. +Going around punching people. +Going to a high school reunion on ketamine. +Grammar nazis who are also regular Nazis. +Grandma. +Grandpa's ashes. +Graphic violence, adult language, and some sexual content. +Grave robbing. +Growing a pair. +Half-assed foreplay. +Harry Potter erotica. +Having anuses for eyes. +Having a penis. +Having been dead for a while. +Having sex on top of a pizza. +Having shotguns for legs. +Heartwarming orphans. +Helplessly giggling at the mention of Hutus and Tutsis. +Her Majesty, Queen Elizabeth II. +Heteronormativity. +Hillary Clinton's death stare. +Hip hop jewels. +Hipsters. +Historically black colleges. +Historical revisionism. +Holding down a child and farting all over him. +Homeless people. +Home video of Oprah sobbing into a Lean Cuisine. +Hope. +Hormone injections. +Horrifying laser removal accidents. +Horse meat. +Hospice care. +Hot cheese. +Hot people. +Hot Pockets. +How awesome I am. +Hurricane Katrina. +Inappropriate yodeling. +Incest. +Indescribable loneliness. +Injecting speed into one arm and horse tranquilizer into the other. +Insatiable bloodlust. +Inserting a mason jar into my anus. +Interspecies marriage. +Intimacy problems. +Invading Poland. +Italians. +Jafar. +Jean-Claude Van Damme in slow motion. +Jeff Goldblum. +Jerking off into a pool of children's tears. +Jewish fraternities. +Jizz. +Jobs. +Joe Biden. +John Wilkes Booth. +Judge Judy. +Jumping out at people. +Justin Bieber. +Just the tip. +Kamikaze pilots. +Kanye West. +Keanu Reeves. +Khakis. +Kids with ass cancer. +Lactation. +Lady Gaga. +Lance Armstrong's missing testicle. +Land mines. +Laying an egg. +Leprosy. +Letting everyone down. +Levelling up. +Licking things to claim them as your own. +Literally eating shit. +Living in a trashcan. +Lockjaw. +Loki, the trickster god. +Lots and lots of abortions. +Lumberjack fantasies. +Lunchables. +Mad hacky-sack skills. +Magnets. +Making a friend. +Making a pouty face. +Making the penises kiss. +Man meat. +Masturbation. +Maximal insertion. +Me. +MechaHitler. +Medieval Times Dinner & Tournament. +Men. +Menstrual rage. +Me time. +Michael Jackson. +Michelle Obama's arms. +Mild autism. +Miley Cyrus at 55. +Moderate to severe joint pain. +Mom. +Moms new boyfriend. +Mooing. +Moral ambiguity. +Morgan Freeman's voice. +Mouth herpes. +Mr. Clean, right behind you. +Mufasa's death scene. +Muhammad (Praise Be Unto Him). +Multiple stab wounds. +Mutually-assured destruction. +My black ass. +My boyfriend's stupid penis. +My collection of high-tech sex toys. +My dad's dumb fucking face. +My dead son's baseball glove. +My first kill. +My first period. +My genitals. +My humps. +My inner demons. +My machete. +My manservant, Claude. +My relationship status. +My sex dungeon. +My sex life. +My soul. +My vagina. +My worthless son. +Natalie Portman. +Natural male enhancement. +Natural selection. +Nazis. +Necrophilia. +Neil Diamond's Greatest Hits. +Neil Patrick Harris. +New Age music. +Nickelback. +Nicolas Cage. +Nipple blades. +No clothes on, penis in vagina. +Not believing in giraffes. +Not contributing to society in any meaningful way. +Not giving a shit about the Third World. +Not having sex. +Nothing. +Not reciprocating oral sex. +Not wearing pants. +Nubile slave boys. +Nunchuck moves. +Object permanence. +Oil! +Old-people smell. +Oncoming traffic. +One Ring to rule them all. +One thousand Slim Jims. +One trillion dollars. +Oompa-Loompas. +Opposable thumbs. +Our first chimpanzee president. +Out-of-this-world bazongos. +Overcompensation. +Overpowering your father. +Pac-Man uncontrollably guzzling cum. +Panda sex. +Party Mexicans. +Passive-aggressive Post-it notes. +Pedophiles. +Peeing a little bit. +Penis breath. +Penis envy. +P.F. Chang himself. +Pictures of boobs. +Pixelated bukkake. +Police brutality. +Pooping back and forth. Forever. +Poopy diapers. +Poor life choices. +Poorly-timed Holocaust jokes. +Poor people. +Power. +Powerful thighs. +Prancing. +Praying the gay away. +Preteens. +Pretending to care. +Pretty Pretty Princess Dress-Up Board Game. +Prince Ali, fabulous he, Ali Ababwa. +Puberty. +Public ridicule. +Pulling out. +Pumping out a baby every nine months. +Puppies! +Putting an entire peanut butter and jelly sandwich into the VCR. +Queefing. +Quiche. +Quivering jowls. +Racially-biased SAT questions. +Racism. +Raptor attacks. +Repression. +Republicans. +Revenge fucking. +Reverse cowgirl. +Riding off into the sunset. +Ripping into a man's chest and pulling out his still-beating heart. +Rising from the grave. +Road head. +Robert Downey, Jr. +RoboCop. +Roland the Farter, flatulist to the king. +Ronald Reagan. +Running naked through a mall, pissing and shitting everywhere. +Running out of semen. +Rush Limbaugh's soft, shitty body. +Russian super-tuberculosis. +Ryan Gosling riding in on a white horse. +Same-sex ice dancing. +Samuel L. Jackson. +Sanding off a man's nose. +Santa Claus. +Sarah Palin. +Savagely beating a mascot. +Saxophone solos. +Saying "I love you." +Science. +Scientology. +Screaming like a maniac. +Scrotal frostbite. +Scrotum tickling. +Sean Connery. +Sean Penn. +Seeing grandma naked. +Seeing my village burned and my family slaughtered before my eyes. +Seeing things from Hitler's perspective. +Self-flagellation. +Self-loathing. +Seppuku. +September 11th, 2001. +Serfdom. +Sexual humiliation. +Sexual peeing. +Sexual Tension. +Sex with Patrick Stewart. +Sexy pillow fights. +Shaft. +Shapeshifters. +Shaquille O'Neal's acting career. +Sharks with legs. +Shiny objects. +Shutting the fuck up. +Silence. +Skeletor. +Slapping a racist old lady. +Slowly easing down onto a cucumber. +Smallpox blankets. +Smegma. +Smoking crack, for instance. +Sneezing, farting and coming at the same time. +Sniffing glue. +Snorting coke off a clown's boner +Social justice warriors with flamethrowers of compassion. +Some douche with an acoustic guitar. +Some god-damn peace and quiet. +Some kind of bird-man. +Some really fucked-up shit. +Some shit-hot guitar licks. +Some sort of Asian. +Soup that is too hot. +Special musical guest, Cher. +Spectacular abs. +Spending lots of money. +Sperm whales. +Spontaneous human combustion. +Sports. +Stalin. +Statistically validated stereotypes. +Stephen Hawking talking dirty. +Stockholm Syndrome. +Stuffing a child's face with Fun Dip until he starts having fun. +Subduing a grizzly bear and making her your wife. +Sudden Poop Explosion Disease. +Sugar madness. +Suicidal thoughts. +Sunshine and rainbows. +Surprise sex! +Sweet, sweet vengeance. +Swiftly achieving orgasm. +Switching to Geico. +Swooping. +Synergistic management solutions. +Syphilitic insanity. +Take-backsies. +Taking off your shirt. +Tasteful sideboob. +Teaching a robot to love. +Teenage pregnancy. +Tentacle porn. +Testicular torsion. +That ass. +The Abercrombie & Fitch lifestyle. +The American Dream. +The Amish. +The art of seduction. +The basic suffering that pervades all of existence. +The Big Bang. +The black half of Barack Obama. +The black Power Ranger. +The Blood of Christ. +The boners of the elderly. +The Boy Scouts of America. +The Care Bear Stare. +The Chinese gymnastics team. +The chronic. +The clitoris. +The complex geopolitical quagmire that is the Middle East. +The cool, refreshing taste of Pepsi. +The day the birds attacked. +The Devil himself. +The economy. +The eight gay warlocks who dictate the rules of fashion. +The entire Internet. +The entire Mormon Tabernacle Choir. +The euphoric rush of strangling a drifter. +The female orgasm. +The folly of man. +The Force. +The four arms of Vishnu. +The gays. +The ghosts of Marlon Brando. +The glass ceiling. +The Great Depression. +The Gulags. +The Hamburglar. +The hardworking mexican. +The Harlem Globetrotters. +The harsh light of day. +The heart of a child. +The hiccups. +The Holy Bible. +The homosexual agenda. +The human body. +The Hustle. +The inevitable death of the universe. +The invisible hand. +The Jews. +The KKK. +The Kool-Aid Man. +The Land of Chocolate. +The light of a billion suns. +The Little Engine That Could. +The Make-A-Wish Foundation. +The mere concept of Applebees. +The milk man. +The miracle of childbirth. +The mixing of the races. +The moist, demanding chasm of his mouth. +The morbidly obese. +The new Radiohead album. +The ooze. +The passage of time. +The Patriarchy. +The peaceful and nonthreatening rise of China. +The penny whistle solo from "My Heart Will Go On." +The pirate's life. +The placenta. +The Pope. +The primal, ball-slapping sex your parents are having right now. +The profoundly handicapped. +The Rapture. +The Rev. Dr. Martin Luther King, Jr. +The rhythms of Africa. +The safe word. +The secret formula for ultimate female satisfaction. +The shambling corpse of Larry King. +The size of my penis. +The South. +The swim team, all at once. +The systematic destruction of an entire people and their way of life. +The Tempur-Pedic Swedish Sleep System. +The terrorists. +The thin veneer of situational casualty that underlies porn. +The Three-Fifths compromise. +The tiger that killed my father. +The tiniest shred of evidence that God is real. +The token minority. +The Trail of Tears. +The true meaning of Christmas. +The Ubermensch. +The unbelievable world of mushrooms. +The Underground Railroad. +The violation of our basic human rights. +The way white people is. +The white half of Barack Obama. +The wonders of the Orient. +The World of Warcraft. +The wrath of Vladimir Putin. +Third base. +This year's mass shooting. +Three consecutive seconds of happiness. +Three dicks at the same time. +Three months in the hole. +Throwing a virgin into a volcano. +Tiny nipples. +Tom Cruise. +Tongue. +Toni Morrison's vagina. +Too much cocaine. +Tripping balls. +Two midgets shitting into a bucket. +Unfathomable stupidity. +Unlimited soup, salad, and breadsticks. +Unquestioning obedience. +Unrelenting genital punishment. +Used panties. +Vegetarian options. +Vehicular manslaughter. +Velcro. +Viagra. +Vietnam flashbacks. +Vigilante justice. +Vigorous jazz hands. +Vikings. +Waiting 'til marriage. +Waking up half-naked in a Denny's parking lot. +Walking in on Dad peeing into mom's mouth. +Weapons-grade plutonium. +Wearing an octopus for a hat. +Wearing glasses and sounding smart. +Western standards of beauty. +Wet dreams. +Whatever a McRib is made of. +What Jesus would do. +When you fart and a little bit comes out. +Whining like a little bitch. +Whipping a disobedient slave. +Whipping it out. +Whispering all sexy. +White-man scalps. +White people. +White privilege. +Wifely duties. +William Shatner. +Winking at old people. +Wiping her butt. +Women in yogurt commercials. +Women's suffrage. +Words, words, words. +World peace. +Yeast. +YOU MUST CONSTRUCT ADDITIONAL PYLONS. +Your weird brother. +Zeus's sexual appetites. diff --git a/usr/share/swiftstory/lang/fr/cards/black b/usr/share/swiftstory/lang/fr/cards/black new file mode 100644 index 0000000..1298307 --- /dev/null +++ b/usr/share/swiftstory/lang/fr/cards/black @@ -0,0 +1,60 @@ +Les Etats-Unis ont débuté le parachutage de _____ aux enfants afghans. +La guerre, c'est bien pour quoi? +Qu'est-ce qui m'empêche de dormir? +C'est quoi cette odeur? +Qui a volé les cookies? +Des études prouvent que les rats de laboratoires se déplacent cinquante fois plus vite dans les labyrinthes après avoir été exposés à _____. +Quand j'irai en prison, je cacherai _____ dans mes fesses pour faire de la contrebande. +Si j'étais Président de la République, je créerais le ministère de _____. +Qu'est-ce qui se bonifie avec le temps? +Je bois pour oublier _____. +Qu'ai-je rapporté du Mexique? +La sortie scolaire a été totalement gâchée par _____. +Qu'est ce que vous n'aimeriez pas trouver dans de la nourriture chinoise? +Dans son nouveau film Disney, Hannah Montana affronte _____ pour la toute première fois. +Pendant le sexe, j'aime penser à _____. +A cause de quoi mon slip est-il trempé? +Que me cachent mes parents? +Les Blancs aiment bien _____. +A cause de quoi les terroristes nous détestent-ils autant? +Comme j'aimerais ne pas avoir perdu la notice pour _____. +Désolé les gens, je viens juste de _____. +C'est quoi ce bruit? +Qu'est-ce qu'on peut trouver par milliers au paradis? +Le meilleur ami des filles, c'est _____. +Quel est le plaisir coupable de Batman? +Les psychanalystes s'allarment devant l'émergence de la phobie de _____ chez la plupart de leurs patients. +Quand j'étais petit, j'adorais _____. +Qu'est-ce qui vous fera réussir à coucher à tous les coups? +Quel est le prochain duo super-héros/acolyte? +_____ : Bon jusqu'à la dernière goutte. +Désormais, le Père Noël n'apportera plus du charbon aux vilains enfants mais _____. +Quel est mon super-pouvoir secret? +Pour draguer, il ne faut surtout pas parler de son penchant pour _____. +Que préfère Nicolas Sarkozy? +Qui est le plus aigri? +_____? Il y a une application pour ça. +Pour mon prochain tour de magie, je vais faire sortir _____ du chapeau. +Durant sa période marron (souvent négligée), Picasso peignait beaucoup de tableaux représentant _____. +La médecine reconnaît enfin les pouvoirs thérapeutiques de _____. +_____ : Testé par les enfants, approuvé par les mamans. +Qu'est-ce qui peut aider à maintenir une relation de couple? +La vie était dure pour les hommes des cavernes avant _____. +Ce soir sur M6, Bernard de la Villardière vous propose une enquête exclusive sur _____. +Que sentent les personnes âgées? +Qu'est-ce qui aide Barack Obama à se changer les idées? +Il mange quoi vin Diesel au petit déjeuner? +Qu'est-ce que mamie trouve d'abord perturbant, puis étrangement plaisant? +_____. C'est un piège. +Quel est le prochain jouet du HappyMeal? +Si j'étais riche, je ferais ériger une statue de 15 mètres de haut pour commémorer _____. +Mais avant de vous tuer, Mr Bond, je dois vous montrer _____. +Ce soir sur Canal+ découvrez la tragique histoire de _____. +Qu'est-ce qui me donne des gaz incontrôlables? +Qu'est-ce qui est le plus hardcore? +Qu'est-ce qui est le plus gay? +Alors que les USA et l'URSS s'affrontaient dans la course à l'espace, le Mexique dépensait des millions de pesos dans la recherche sur _____. +Alors que Pharaon restait impassible Moise provoqua la onzième plaie : _____. +Je ne sais pas avec quelles armes se fera la Troisième Guerre Mondiale, mais la Quatrième se fera à coups de _____. +La dernière chose à laquelle pensa Michael Jackson avant de mourir fut _____. +Des ethnographes ont récemment découvert une tribu aborigène vouant un culte à _____. diff --git a/usr/share/swiftstory/lang/fr/cards/white b/usr/share/swiftstory/lang/fr/cards/white new file mode 100644 index 0000000..b3766a7 --- /dev/null +++ b/usr/share/swiftstory/lang/fr/cards/white @@ -0,0 +1,396 @@ +La Sainte Bible. +La Macarena. +Se chier dessus. +Un anus maquillé. +Les juifs avec une coupe afro. +Les P'tits Filous Tubes. +Une branlette tristement exécutée. +François Ba Des biscuits apéro. +Michaël Jackson +BATMAN!!! +Les Vikings. +L'abstinence. +Le bibendum Michelin. +Superbus. +Son Altesse royale, la reine Elizabeth II. +L'auto-cannibalisme. +La série des "Fais-moi peur !" +Le ping pong de caca cul à cul. +Pour toujours. +La fête du slip. +Mes parties génitales. +L'inceste. +L'Amérique. +Les chansons de Pascal Obispo. +Un twist de M. Night Shyamalan. +Mourir de la dysenterie. +Les équipes chinoises de gynmastique. +Du sexe surprise ! +Batifoler. +Une tortue vicieuse qui te mord la bite. +Le lancer de nain sur une cible en velcro. +2 Girls 1 Cup (vidéo scatophile célèbre sur Internet). +La tension sexuelle. +Une fête d'anniversaire ratée. +Du Axe Body Spray. +Des bébés chiens ! +Les gens qui sentent leurs chaussettes. +La destruction mutuelle assurée. +Le Ku Klux Klan. +Boire tout seul. +Des abdominaux spectaculaires. +Faire le bon choix. +Du sperme de baleine. +Les inondations. +Center Park. +Les Oompas Loompas. +La capacité d'écoute. +Se mettre tellement en colère que ça en donne une érection. +Les Juifs. +Les cols portés relevés. +World of Warcraft. +Faire la moue. +Gargamel. +Les Twinkies. +Le Stade de France. +Etre un sale con envers les enfants. +Des salopes. +Les enfants tenus en laisse. +Laisser un message maladroit sur un répondeur. +Beaucoup de bruit pour rien. +Les Noirs. +La lactation. +Natalie Portman. +Britney Spears à 55 ans. +Les Jazz Hands. +Une fanfic érotique sur l'univers de Harry Potter. +Les existentialistes. +La science. +Une mycose. +Chier dans la soupe. +La puberté. +Le Pape. +Abuser des cabines de bronzage. +Les tétraplégiques. +Un cinquantenaire qui pratique le roller. +Se retirer. +Brouter. +Péter et s'en aller. +Parkinson. +Auschwitz. +Des chèvres qui mangent des sacs poubelle. +Boire un verre de beurre fondu. +La couille manquante de Lance Armstrong. +Le faire dans les fesses. +La séduction. +Les Jonas Brothers. +La sexualité des pandas. +Un chameau en dessin animé qui apprécie une délicieuse et rafraichissante taffe de cigarette. +Respirer de la colle. +Les sites de rencontres échangistes. +Les exercices pour stimuler l'esprit d'équipe en entreprise. +Plus Belle La Vie. +Se torcher. +L'impuissance. +Un tir dans son propre camp. +Les solos de saxophone. +Un énième film de vampires. +La kétamine. +Les oestrogènes. +Le Sud. +Manger pour pouvoir vomir. +Un bulot. +Des catapultes. +Un burrito très pimenté. +Les filles à qui l'alcool ne réussit pas. +Des gobelins. +La Scientologie. +Nicolas Cage. +Une torsion musculaire. +La chair humaine. +La revente de cadeau sur eBay. +Une vidéo amateur de Claire Chazal qui sanglote au dessus d'un plat surgelé. +Les chapeaux à hélices. +Où sont les toilettes ? +Les Hot Pockets. +Des pilotes kamikazes. +La lèpre. +Les concours de beauté pour enfants. +Les pantalons fendus en cuir des motards et des cowboys. +Des oeufs de ptérodactyles. +Des couvertures avec la variole. +Le sexe oral non réciproque. +Des sucettes géantes. +Gandhi. +Les soutifs lance-flammes. +Le Viagra. +Dr. Martin Luther King Jr. +Sean Penn. +Keanu Reeves. +L'esclavage. +Genghis Khan. +Corky. +Un gardien de but. +Des oies. +Des refaits asymétriques. +Les hommes. +La bestialité. +Ce putain de jeu. +Le Médiator. +Des Chuppa Chups. +Will Smith. +La peluche "Elmo chatouille-moi". +Les couteaux à cran d'arrêt. +Des enfants avec un cancer du colon. +Des pankakes. +Céline Dion. +Une canette de Red Bull. +Le sang du Christ. +Ta mère qui me demande en ami sur Facebook. +Les gens en chaleur. +Les profs remplaçants. +Une parade nuptiale. +Avoir un calcul rénal. +La bagarre. +Jamie de C'est Pas Sorcier. +Les piercings sur les parties génitales. +Les témoins de Jéhovah. +Les roux. +Sarah Palin. +L'agriculture. +Le tri sélectif. +Les pornos SM allemands. +Un terroriste qui fait des vannes. +Une fusillade dans un lycée. +L'avortement au cintre. +Le caca qui brule. +Mon statut relationnel. +Doigter. +Le SIDA. +Valérie Damidot. +Les rabat-joies. +Une lobotomie au pic à glace. +Un type louche en imperméable qui traine devant les écoles primaires. +Les chinois. +Un caniche nain. +Les trous dans les cloisons des WC sur les aires d'autoroutes (glory holes). +Louragan Katrina. +Les Oreos. +Les Nazis. +Les femmes dans les pubs de yaourts. +Les règles abondantes. +Les Frolics. +Les mines antipersonnel. +Une maison de retraite. +Le placenta. +Bono. +Justin Bieber. +La nécrophilie. +Un prépuce. +Indochine. +Le Big Bang. +Bob l'éponge. +Ma collection de sex-toys high-tech. +La guérison par la foi. +Mon âme. +Aller à la messe de minuit. +Les connards sur leur iPhone 4S. +La répression. +Improviser un dispositif à base d'explosifs. +Draguer des personnes âgées. +Les éjaculations nocturnes. +Heath Ledger. +Les personnes âgées japonaises. +La Valse des Fleurs. +Une fellation au volant. +Les fatasmes sur les bucherons. +Un téton qui sort du soutien-gorge. +Les bébés morts. +Etre en feu. +La masturbation. +Le triangle des Bermudes. +Un océan de troubles. +La sélection naturelle. +Des parents morts. +Les Italiens. +Tom Cruise. +La chevalerie. +Les jeux vidéo en réseau. +Le clitoris. +Les mangas pornos avec tentacules. +Mahomet. +Un gros ventre fendu qui ressemble à un cul. +La maltraitance sur mineur. +Toucher des organes génitaux par inadvertance. +Super Mario qui vient réparer une fuite dans un film porno. +Le Télétubbie qui fait le plus gay des quatre. +Les amis qui bouffent tous vos biscuits. +Paris Hilton. +Un mime qui fait une attaque. +Twitter. +Des préléminaires laborieux. +Un moment à soi. +Des gants en latex. +Porter des sous-vêtements à l'envers pour éviter de faire une machine. +Des crevettes à volonté pour 4.99$ +Des échantillons gratuits. +Du kloug. +Un poil pubien abandonné. +Attendre jusqu'au mariage. +Cette réponse est post-moderne. +Un Tamagotchi négligé. +Les décolletés élégants. +Des travestis potables. +Arnold Schwarzenegger. +Piller des tombes. +Un pistolet à eau rempli de pipi de chat. +D'Artagnan. +Ronald McDonald. +Se donner à 110%. +Nourrir Laurence Boccolini. +Un coup d'oeil. +De multiples coups de couteau. +Casimir. +Le meurtre le plus immonde. +Le périnée. +Ouvrir la Mer Rouge. +Trop de gel dans les cheveux. +Les vidéos porno hardcore. +Les sous-vêtements comestibles. +Les Blancs. +Tiger Woods. +Descendre en piqué. +Coucher avec elle. +Les chants tyroliens dans les moments innappropriés. +K2000. +Les fantômes. +Un plan cul. +L'intrigue d'un film de Michael Bay. +La folie des hommes. +Un chapeau vraiment très cool. +La musique pop turque. +Robert Downey Jr. +Nicolas Hulot. +Cacher une érection. +L'herpès buccal. +Le comportement passif agressif. +Deux nains qui chient dans un sceau. +Les pré-adolescentes. +Hippo Gloutons. +Kayne West. +Vomir sans vomi. +Eric Zemmour. +Les sans-abris. +Coco, le singe des Coco Pops. +Les échanges de politesse. +Des boules. +Le nettoyage ethnique. +Le truc du Télé Achat qui électrocute les abdominaux. +La gastro. +Des centaures. +Un uppercut. +Les nains. +Quand tu pètes et que ça fait un léger bruit. +Enlever ton t-shirt. +Monsieur Patate. +Un foetus. +Des blagues sur l'Holocauste au moment inopportun. +Un spectacle de marionnettes. +Les pets vaginaux. +Un Sunday Caramel. +Des abeilles ? +Le droit de vote aux femmes. +Bond, James Bond. +De la pâtée pour chat. +Le pudding à la figue. +Le soleil qui brille et les arcs en ciel. +Le réchauffement planétaire. +Boire de la bière en faisant le poirier sur le tonneau. +La règle de trois. +Porter des moufles. +Etre fabuleux. +Buzz l'Eclair qui explique le sexe au enfants. +Manger tous les cookies qu'on devait vendre à la kermesse. +Les émotions. +Du thon en boite avec des bouts de dauphins. +Tricher aux Jeux Olympiques Spéciaux (réservés aux handicapés mentaux). +Une attaque de vélociraptors. +Une course à la mort en fauteuil roulant. +L'attitude. +Les surdoués en mathématiques. +Les boules anales. +Les joueurs de djembé amateurs. +Un moulin à vent rempli de cadavres. +Hulk Hogan. +Le smegma. +Des pédophiles. +Scalper. +Porter des semelles compensées. +La Gestapo. +La torture par l'eau. +Les chorégraphies disco. +Chuck Norris qui casse de la lesbienne antisémite. +La Heineken. +Un micropénis. +Les oiseaux qui ne savent pas voler. +Braquer une banque du sperme. +Les quotas pour les minorités. +Un complexe d'Oedipe +Les combats de coqs. +La carrière musicale de Tony Parker. +Ma vie sexuelle. +Julien Lepers. +Se saouler au bain de bouche. +La maladie de la vache folle. +Hara-kiri. +Piéger votre maison par peur des voleurs. +Le patinage artistique en duo non mixte. +Dark Vador. +Voldemort. +Lécher les choses pour prouver qu'elles sont à vous. +Nicolas Sarkozy. +La Gay Pride. +La combustion spontanée. +Barack Obama. +Apprendre à un robot à aimer. +Sean Connery. +La paix mondiale. +La dépression nerveuse. +Les amputés. +Une mama black en colère. +Les Talibans. +Le coeur d'un enfant. +Etre riche. +Des bananes en pyjamas. +Se gratter le cul ni vu ni connu. +Les golden showers (pratique urophile). +Des victimes civiles. +Une érection qui dure plus de quatre heures. +Ces moments où vous avez du sable dans le vagin. +Se pavaner. +L'obésité. +Les gays. +Les petits chanteurs à la croix de bois. +Faire un petit pipi. +Mourir. +Essayer de pécho de la meuf à la sortie des cliniques d'avortement. +Les asiatiques qui ne sont pas bons en maths. +Les garçons qui n'appellent pas. +L'odeur des vieux. +Un singe qui fume le cigare. +Une détonation thermonucléaire. +Kim Jong II. +Faire un câlin. +La vieille qui joue dans Arabesques. +La diarrhée des lendemains de fêtes arrosées. +L'alcoolisme. +Le racisme. +Le catéchisme. +Les préservatifs parfumés. +Se réveiller à moitié nu sur le parking du McDo. +Le vagin de Whoopi Goldberg. +Monsieur Propre. +Les pauvres. +L'envie de pénis. +Les Mexicains qui travaillent dur. +Douce, douce vengeance... diff --git a/webapp/cao-common.css b/webapp/cao-common.css deleted file mode 100644 index c574b6d..0000000 --- a/webapp/cao-common.css +++ /dev/null @@ -1,32 +0,0 @@ -body { - background-color: #222222; - color: #dddddd; -} - -td { - border: 1px white solid; -} - -#black_card { - display: none; -} - -#white_cards { - display: none; -} - -#played_cards { - display: none; -} - -#btn_join { - display: none; -} - -#btn_collect { - display: none; -} - -#btn_pick_black { - display: none; -} diff --git a/webapp/cao-common.js b/webapp/cao-common.js deleted file mode 100644 index 0ec516d..0000000 --- a/webapp/cao-common.js +++ /dev/null @@ -1,348 +0,0 @@ -var CAO = function() { - this.on_socket_open = function() { /* to override */ }; - this.on_socket_close = function() { /* to override */ }; - this.on_socket_error = function(evt) { /* to override */}; - - this.on_join_game_ok = function(state) { /* to override */ }; - this.on_show_white_card = function(idx, desc) { /* to override */ }; - this.on_pick_black_card_ok = function() { /* to override */ }; - this.on_show_black_card = function(desc) { /* to override */ }; - this.on_play_white_card_ok = function(idx) { /* to override */ }; - this.on_collect_cards_ok = function() { /* to override */ }; - this.on_show_played_card = function(idx, desc) { /* to override */ }; - this.on_designate_card_ok = function(idx) { /* to override */ }; - - this.on_judge_needed = function() { /* to override */ }; - this.on_judge_designed = function() { /* to override */ }; - this.on_player_joined_game = function() { /* to override */ }; - this.on_card_played = function() { /* to override */ }; - this.on_cards_collected = function() { /* to override */ }; - this.on_updated_score = function(new_score) { /* to override */ }; - this.on_change_state = function(state) { /* to override */ }; - this.on_change_nbr_played_cards = function(nbr) { /* to override */ }; - - var request_queue = []; - - var judge = false; - - var self = this; - var ws; - - var lang; - - var nbr_played_cards = 0; - - var played_cards = []; - var white_cards = {}; - var black_card; - - var score = 0; - - var map_handle_response_ok = {}; - var map_handle_notif = {}; - - this.set_lang = function(language) { - lang = language; - }; - - this.is_judge = function() { - return judge; - }; - - this.reset_nbr_played_cards = function() { - nbr_played_cards = 0; - - self.on_change_nbr_played_cards(nbr_played_cards); - }; - - this.incr_nbr_played_cards = function() { - ++nbr_played_cards; - - self.on_change_nbr_played_cards(nbr_played_cards); - }; - - this.get_white_card_event = function(idx) { - return white_cards[idx]['event']; - }; - - this.get_played_card_event = function(idx) { - return played_cards[idx]['event']; - }; - - this.change_state = function(state) { - game_state = state; - - switch (state) { - case 'waiting_judge': - played_cards = []; - self.reset_nbr_played_cards(); - judge = false; - - self.on_judge_needed(); - - break; - case 'waiting_collection': - break; - case 'waiting_designation': - break; - } - - this.on_change_state(state); - }; - - /* map_handle_response_ok {{{ */ - - map_handle_response_ok['join_game'] = function(result) { - self.on_join_game_ok(); - - self.change_state(result['game_state']); - - map_handle_response_ok['view_player_cards'](result); - }; - - map_handle_response_ok['view_player_cards'] = function(result) { - for (var i in result['cards']) { - var idx = result['cards'][i][0]; - var desc = result['cards'][i][1]; - - white_cards[idx] = { - 'desc': desc, - 'event': self.gen_callback_white_card(idx) - }; - - self.on_show_white_card(idx, desc) - } - }; - - map_handle_response_ok['pick_black_card'] = function(result) { - judge = true; - self.change_state('waiting_collection'); - - self.on_pick_black_card_ok(); - map_handle_response_ok['view_black_card'](result); - }; - - map_handle_response_ok['view_black_card'] = function(result) { - black_card = result; - self.on_show_black_card(black_card); - }; - - map_handle_response_ok['play_white_card'] = function(result) { - idx = result['card_id']; - - self.on_play_white_card_ok(idx); - - delete white_cards[idx]; - }; - - map_handle_response_ok['collect_cards'] = function(result) { - self.change_state('waiting_designation'); - - self.on_collect_cards_ok(); - map_handle_response_ok['view_played_cards'](result); - }; - - map_handle_response_ok['view_played_cards'] = function(result) { - for (var i in result) { - var desc = result[i]; - - played_cards.push({ - 'desc': desc, - 'event': self.gen_callback_played_card(i), - }); - self.on_show_played_card(i, desc); - } - - if (!result.length) { - self.gen_callback_played_card(null)(); - } - }; - - map_handle_response_ok['designate_card'] = function(result) { - self.change_state('waiting_judge'); - - self.on_designate_card_ok(); - }; - - /* }}} */ - /* handle_notif {{{ */ - - map_handle_notif['judge_designed'] = function(result) { - self.change_state('waiting_collection'); - - self.on_judge_designed(); - }; - - map_handle_notif['received_card'] = function(result) { - var idx = result['card']['id']; - var desc = result['card']['desc']; - - white_cards[idx] = { - 'desc': desc, - 'event': self.gen_callback_white_card(idx) - }; - - self.on_show_white_card(idx, desc); - }; - - map_handle_notif['judge_needed'] = function(result) { - self.change_state('waiting_judge'); - }; - - map_handle_notif['player_joined_game'] = function(result) { - self.on_player_joined_game(); - }; - - map_handle_notif['card_played'] = function(result) { - self.incr_nbr_played_cards(); - - self.on_card_played(); - }; - - map_handle_notif['cards_collected'] = function(result) { - self.change_state('waiting_designation'); - - self.on_cards_collected(); - }; - - map_handle_notif['updated_score'] = function(result) { - self.score = result; - - self.on_updated_score(self.score); - }; - - /* }}} */ - - this.run = function() { - ws = new WebSocket('ws://' + document.location.hostname + ':1236'); - - ws.onopen = function() { - console.log('connection established'); - self.on_socket_open(); - }; - - ws.onclose = function() { - self.on_socket_close(); - }; - - ws.onmessage = function(evt) { - var message = JSON.parse(evt.data); - - if (message['type'] == 'notification') { - handle_notif(message['content']); - } else { - handle_response(message['content']); - } - }; - - ws.onerror = function(evt) { - console.log(evt); - self.on_socket_error(evt); - }; - - }; - - var handle_notif = function(notif) { - if (map_handle_notif[notif['op']]) { - map_handle_notif[notif['op']](notif['content']); - } else { - console.log('unhandled notif ' + notif); - } - }; - - var handle_response = function(response) { - var rq = request_queue.shift(); - - if (response['status'] != 0) { - alert(response['info']); - return; - } - - if (map_handle_response_ok[rq]) { - map_handle_response_ok[rq](response['result']) - } else { - console.log(evt); - } - }; - - this.gen_callback_white_card = function(index) { - return function() { - var request = { - 'op': 'play_white_card', - 'card_id': index, - }; - - request_queue.push('play_white_card'); - ws.send(JSON.stringify(request)); - }; - }; - - this.gen_callback_played_card = function(index) { - return function() { - var request = { - 'op': 'designate_card', - 'card_id': index, - }; - - request_queue.push('designate_card'); - ws.send(JSON.stringify(request)); - }; - }; - - this.join_game = function(game_name) { - var request = { - 'op': 'join_game', - 'game_name': game_name, - 'lang': lang, - }; - request_queue.push('join_game'); - ws.send(JSON.stringify(request)); - }; - - this.pick_black_card = function() { - var request = { - 'op': 'pick_black_card', - }; - request_queue.push('pick_black_card'); - ws.send(JSON.stringify(request)); - }; - - this.collect_cards = function() { - var request = { - 'op': 'collect_cards', - }; - request_queue.push('collect_cards'); - ws.send(JSON.stringify(request)); - }; - - this.request_show_cards = function() { - var request = { - 'op': 'view_player_cards', - }; - - request_queue.push('view_player_cards'); - ws.send(JSON.stringify(request)); - }; - this.request_show_black_card = function() { - var request = { - 'op': 'view_black_card', - }; - - request_queue.push('view_black_card'); - ws.send(JSON.stringify(request)); - }; - this.request_show_played_cards = function() { - var request = { - 'op': 'view_played_cards', - }; - - request_queue.push('view_played_cards'); - ws.send(JSON.stringify(request)); - }; -}; - -var cao; - -$(document).ready(function() { - cao = new CAO(); -}); diff --git a/webapp/cao-config.js b/webapp/cao-config.js deleted file mode 100644 index ddfe0fc..0000000 --- a/webapp/cao-config.js +++ /dev/null @@ -1,13 +0,0 @@ -$(document).ready(function() { - var lang; - var hostname = document.location.hostname; - - /* XXX replace this with your desired behaviour */ - if (hostname.substring(0, 3) === 'fr.') { - lang = 'fr'; - } else if (hostname.substring(0, 3) === 'en.') { - lang = 'en'; - } - - cao.set_lang(lang); -}); diff --git a/webapp/cao-desktop.html b/webapp/cao-desktop.html deleted file mode 100644 index 34f4721..0000000 --- a/webapp/cao-desktop.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - CAO - - - - - - - - - - -
-
-
    -
      - - diff --git a/webapp/cao-desktop.js b/webapp/cao-desktop.js deleted file mode 100644 index faa864b..0000000 --- a/webapp/cao-desktop.js +++ /dev/null @@ -1,88 +0,0 @@ -$(document).ready(function() { - $('#btn_join').click(function() { - var game_name = prompt('Name of the game'); - - cao.join_game(game_name); - }); - - $('#btn_pick_black').click(function() { - cao.pick_black_card(); - }); - - $('#btn_collect').click(function() { - cao.collect_cards(); - }); - - cao.on_socket_open = function() { - $('#btn_join').show(); - }; - - cao.on_join_game_ok = function(state) { - $('#btn_join').hide(); - $('#btn_pick_black').show(); - $('#white_cards').show(); - }; - - cao.on_show_white_card = function(idx, desc) { - identifier = 'white_card_' + idx; - content = '
    • ' + desc + '
    • '; - - $('#white_cards').append(content); - - $('#' + identifier).dblclick(this.gen_callback_white_card(idx)); - }; - - cao.on_show_played_card = function(idx, desc) { - identifier = 'played_card_' + idx; - - content = '
    • ' + desc + '
    • '; - - $('#played_cards').append(content); - - $('#' + identifier).dblclick(this.gen_callback_played_card(idx)); - }; - - - cao.on_pick_black_card_ok = function() { - $('#btn_collect').show(); - $('#btn_pick_black').hide(); - }; - - cao.on_show_black_card = function(desc) { - $('#black_card').show(); - $('#black_card').html(desc); - }; - - - cao.on_play_white_card_ok = function(idx) { - identifier = 'white_card_' + idx; - $('#' + identifier).remove(); - }; - - cao.on_designate_card_ok = function() { - $('#played_cards').empty(); - $('#played_cards').hide(); - $('#black_card').hide(); - $('#btn_collect').hide(); - $('#btn_pick_black').show(); - }; - - cao.on_collect_cards_ok = function() { - $('#btn_collect').hide(); - $('#played_cards').show(); - }; - - cao.on_judge_designed = function() { - $('#btn_pick_black').hide(); - }; - - cao.on_judge_needed = function() { - $('#btn_pick_black').show(); - }; - - cao.on_updated_score = function(score) { - console.log('new score: ' + score); - }; - - cao.run(); -}); diff --git a/webapp/cao-mobile.css b/webapp/cao-mobile.css deleted file mode 100644 index 796f190..0000000 --- a/webapp/cao-mobile.css +++ /dev/null @@ -1,147 +0,0 @@ -@import url(http://fonts.googleapis.com/css?family=Special+Elite); -body { - font-family: "Special Elite", sans-serif; - background: #333333; - color: #dddddd; -} -header { - background: #222222; - position: fixed; - top: 0; - left: 0; - right: 0; - height: 50px; - z-index: 1; - border-bottom: 4px solid #000; - padding: 20px; - box-sizing: border-box; -} -header > span#score { - opacity: 0.7; -} -header > span#leave-room { - opacity: 0.7; - float: right; - cursor: pointer; -} -header > span#leave-room:hover { - opacity: 1; -} -.page { - padding: 70px 20px 120px; - margin: auto; - max-width: 650px; -} -#home { - padding-top: 20px; -} -.page:not(.current) { - display: none; -} -h1 { - font-weight: normal; - font-size: 4.5em; - text-align: center; - text-shadow: 0 5px 0 #000; -} -h2 { - text-align: center; - font-weight: normal; - color: #999999; - font-size: 2em; -} -button { - outline: none; - font-size: 2em; - width: 100%; - cursor: pointer; - font-family: "Special Elite", sans-serif; -} -button.card { - color: #222222; - background: #dddddd; - border: 4px solid #999; - box-shadow: 0 5px 0 #999; - padding: 20px; - border-radius: 10px; - animation: appear .3s; -} -button.card:not(:last-child) { - margin-bottom: 20px; -} -button.card:active, button.card.black:active { - transform: translateY(5px); - box-shadow: none; -} -button.card.black { - background: #222222; - color: #dddddd; - border: 4px solid #000; - box-shadow: 0 5px 0 #000; -} -button.card:not(.active) { - opacity: 0.7; -} -button.card:hover { - opacity: 1.0; -} -div.card-list.read-only > button.card { - cursor: default; -} -div.card-list.read-only > button.card:hover { - opacity: 0.7; -} -div.card-list.read-only > button.card:active { - transform: none; - box-shadow: 0 5px 0 #999; -} -div.card-list.read-only > button.card.black:active { - box-shadow: 0 5px 0 #000; -} -.bottom { - position: fixed; - bottom: 0; - left: 0; - right: 0; - height: 100px; - box-sizing: border-box; -} -div.bottom { - padding: 20px; - font-size: 1.5em; - background: #222222; - color: #dddddd; - border: 4px solid #000; -} -button.bottom { - font-size: 2.5em; - color: #222222; - border: 4px solid #455A64; - background: #78909C; - transition: .3s; -} -button.bottom:hover { - background: #455A64; - font-size: 2.7em; -} -.message { - padding: 40px; - font-size: 2.5em; - text-align: center; - text-shadow: 0 5px 0 #000; -} -@media screen and (max-width: 600px) { - h1 { - font-size: 3em; - } -} -@keyframes appear { - 0% { - opacity: 0; - transform: translateX(-400px); - } - 100% { - transform: translateX(0); - opacity: 0.7; - } -} \ No newline at end of file diff --git a/webapp/cao-mobile.html b/webapp/cao-mobile.html deleted file mode 100644 index 7aa619d..0000000 --- a/webapp/cao-mobile.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - CAO - - - - - - - - -
      - -
      -

      Cards Against Humanity

      -

      A party game for horrible people.

      - -
      -
      -
      -
      - -
      -
      You have 0 cards!
      -
      -
      -
      - -
      Pick the best card...
      -
      Choose a card...
      -
      Waiting for judge...
      - -
      - - diff --git a/webapp/cao-mobile.js b/webapp/cao-mobile.js deleted file mode 100644 index acac68e..0000000 --- a/webapp/cao-mobile.js +++ /dev/null @@ -1,155 +0,0 @@ -$(document).ready(function() { - var $home = $("#home"); - var $game = $("#game"); - var $become_judge = $('[data-state="become-judge"]'); - var $judge_collect = $('[data-state="judge-collect"]'); - var $judge_choose = $('[data-state="judge-choose"]'); - var $player_choose = $('[data-state="player-choose"]'); - var $player_wait = $('[data-state="player-wait"]'); - var $leave_room = $('#leave-room'); - var $all = $("[data-state]"); - var $join_btn = $("#join-btn"); - var $become_judge_btn = $("#become-judge-btn"); - var $judge_collect_btn = $("#judge-collect-btn"); - var $black_card = $("#black-card"); - var $played_card_number = $("#played-card-number"); - var $header = $("header"); - var $white_cards = $('#white-cards'); - var $played_cards = $('#played-cards'); - var $score_value = $('#score-value'); - - $leave_room.click(function () { - window.location.reload(); - }); - - $become_judge_btn.click(function() { - cao.pick_black_card(); - }); - - $join_btn.click(function () { - cao.join_game(prompt('Name of the game')); - }); - - $judge_collect_btn.click(function() { - cao.collect_cards(); - }); - - cao.on_socket_open = function() { - $join_btn.show(); - }; - - cao.on_join_game_ok = function() { - $header.show(); - $home.removeClass("current"); - $game.addClass("current"); - $all.hide(); - }; - - cao.on_change_state = function(state) { - $all.hide(); - - switch (state) { - case 'waiting_judge': - $become_judge.show(); - $white_cards.attr('disabled', true); - $white_cards.addClass('read-only'); - break; - case 'waiting_designation': - if (cao.is_judge()) { - $judge_choose.show(); - $played_cards.removeAttr('disabled'); - $played_cards.removeClass('read-only'); - } else { - $player_wait.show(); - $white_cards.attr('disabled', true); - $white_cards.addClass('read-only'); - } - break; - case 'waiting_collection': - if (cao.is_judge()) { - $judge_collect.show(); - $white_cards.attr('disabled', true); - $white_cards.addClass('read-only'); - } else { - $player_choose.show(); - $white_cards.removeAttr('disabled'); - $white_cards.removeClass('read-only'); - } - break; - default: - console.log('unhandled state'); - break; - } - }; - - cao.on_show_white_card = function(idx, desc) { - var identifier = 'white-card-' + idx; - var content = ''; - $white_cards.append(content); - var self = this; - $('#' + identifier).click(function () { - var $this = $(this); - if (!$white_cards.attr('disabled')) { - if ($this.hasClass("active")) { - cao.get_white_card_event($this.prop('name'))(); - } else { - $white_cards.find("> .card").removeClass("active"); - $this.addClass("active"); - } - } - }); - }; - - cao.on_show_played_card = function(idx, desc) { - var identifier = 'played-card-' + idx; - var content = ''; - $played_cards.append(content); - var self = this; - $('#' + identifier).click(function () { - var $this = $(this); - if (!$played_cards.attr('disabled')) { - if ($this.hasClass("active")) { - cao.get_played_card_event($this.prop('name'))(); - } else { - $played_cards.find("> .card").removeClass("active"); - $this.addClass("active"); - } - } - }); - }; - - cao.on_show_black_card = function(desc) { - $('#black-card').html(desc); - }; - - cao.on_play_white_card_ok = function(idx) { - $white_cards.attr('disabled', true); - $white_cards.addClass('read-only'); - - $player_wait.show(); - - $('#white-card-' + idx).remove(); - }; - - cao.on_updated_score = function(score) { - $score_value.text(score); - }; - - cao.on_change_nbr_played_cards = function(nbr) { - $played_card_number.text(nbr); - }; - - cao.on_collect_cards_ok = function() { - $white_cards.hide(); - $played_cards.show(); - }; - - cao.on_designate_card_ok = function(idx) { - $played_cards.empty(); - - $played_cards.hide(); - $white_cards.show(); - }; - - cao.run(); -}); diff --git a/webapp/index.html b/webapp/index.html index 8ffec2d..36c43de 120000 --- a/webapp/index.html +++ b/webapp/index.html @@ -1 +1 @@ -cao-mobile.html \ No newline at end of file +swiftstory-mobile.html \ No newline at end of file diff --git a/webapp/swiftstory-common.css b/webapp/swiftstory-common.css new file mode 100644 index 0000000..c574b6d --- /dev/null +++ b/webapp/swiftstory-common.css @@ -0,0 +1,32 @@ +body { + background-color: #222222; + color: #dddddd; +} + +td { + border: 1px white solid; +} + +#black_card { + display: none; +} + +#white_cards { + display: none; +} + +#played_cards { + display: none; +} + +#btn_join { + display: none; +} + +#btn_collect { + display: none; +} + +#btn_pick_black { + display: none; +} diff --git a/webapp/swiftstory-common.js b/webapp/swiftstory-common.js new file mode 100644 index 0000000..174b473 --- /dev/null +++ b/webapp/swiftstory-common.js @@ -0,0 +1,348 @@ +var SwiftStory = function() { + this.on_socket_open = function() { /* to override */ }; + this.on_socket_close = function() { /* to override */ }; + this.on_socket_error = function(evt) { /* to override */}; + + this.on_join_game_ok = function(state) { /* to override */ }; + this.on_show_white_card = function(idx, desc) { /* to override */ }; + this.on_pick_black_card_ok = function() { /* to override */ }; + this.on_show_black_card = function(desc) { /* to override */ }; + this.on_play_white_card_ok = function(idx) { /* to override */ }; + this.on_collect_cards_ok = function() { /* to override */ }; + this.on_show_played_card = function(idx, desc) { /* to override */ }; + this.on_designate_card_ok = function(idx) { /* to override */ }; + + this.on_judge_needed = function() { /* to override */ }; + this.on_judge_designed = function() { /* to override */ }; + this.on_player_joined_game = function() { /* to override */ }; + this.on_card_played = function() { /* to override */ }; + this.on_cards_collected = function() { /* to override */ }; + this.on_updated_score = function(new_score) { /* to override */ }; + this.on_change_state = function(state) { /* to override */ }; + this.on_change_nbr_played_cards = function(nbr) { /* to override */ }; + + var request_queue = []; + + var judge = false; + + var self = this; + var ws; + + var lang; + + var nbr_played_cards = 0; + + var played_cards = []; + var white_cards = {}; + var black_card; + + var score = 0; + + var map_handle_response_ok = {}; + var map_handle_notif = {}; + + this.set_lang = function(language) { + lang = language; + }; + + this.is_judge = function() { + return judge; + }; + + this.reset_nbr_played_cards = function() { + nbr_played_cards = 0; + + self.on_change_nbr_played_cards(nbr_played_cards); + }; + + this.incr_nbr_played_cards = function() { + ++nbr_played_cards; + + self.on_change_nbr_played_cards(nbr_played_cards); + }; + + this.get_white_card_event = function(idx) { + return white_cards[idx]['event']; + }; + + this.get_played_card_event = function(idx) { + return played_cards[idx]['event']; + }; + + this.change_state = function(state) { + game_state = state; + + switch (state) { + case 'waiting_judge': + played_cards = []; + self.reset_nbr_played_cards(); + judge = false; + + self.on_judge_needed(); + + break; + case 'waiting_collection': + break; + case 'waiting_designation': + break; + } + + this.on_change_state(state); + }; + + /* map_handle_response_ok {{{ */ + + map_handle_response_ok['join_game'] = function(result) { + self.on_join_game_ok(); + + self.change_state(result['game_state']); + + map_handle_response_ok['view_player_cards'](result); + }; + + map_handle_response_ok['view_player_cards'] = function(result) { + for (var i in result['cards']) { + var idx = result['cards'][i][0]; + var desc = result['cards'][i][1]; + + white_cards[idx] = { + 'desc': desc, + 'event': self.gen_callback_white_card(idx) + }; + + self.on_show_white_card(idx, desc) + } + }; + + map_handle_response_ok['pick_black_card'] = function(result) { + judge = true; + self.change_state('waiting_collection'); + + self.on_pick_black_card_ok(); + map_handle_response_ok['view_black_card'](result); + }; + + map_handle_response_ok['view_black_card'] = function(result) { + black_card = result; + self.on_show_black_card(black_card); + }; + + map_handle_response_ok['play_white_card'] = function(result) { + idx = result['card_id']; + + self.on_play_white_card_ok(idx); + + delete white_cards[idx]; + }; + + map_handle_response_ok['collect_cards'] = function(result) { + self.change_state('waiting_designation'); + + self.on_collect_cards_ok(); + map_handle_response_ok['view_played_cards'](result); + }; + + map_handle_response_ok['view_played_cards'] = function(result) { + for (var i in result) { + var desc = result[i]; + + played_cards.push({ + 'desc': desc, + 'event': self.gen_callback_played_card(i), + }); + self.on_show_played_card(i, desc); + } + + if (!result.length) { + self.gen_callback_played_card(null)(); + } + }; + + map_handle_response_ok['designate_card'] = function(result) { + self.change_state('waiting_judge'); + + self.on_designate_card_ok(); + }; + + /* }}} */ + /* handle_notif {{{ */ + + map_handle_notif['judge_designed'] = function(result) { + self.change_state('waiting_collection'); + + self.on_judge_designed(); + }; + + map_handle_notif['received_card'] = function(result) { + var idx = result['card']['id']; + var desc = result['card']['desc']; + + white_cards[idx] = { + 'desc': desc, + 'event': self.gen_callback_white_card(idx) + }; + + self.on_show_white_card(idx, desc); + }; + + map_handle_notif['judge_needed'] = function(result) { + self.change_state('waiting_judge'); + }; + + map_handle_notif['player_joined_game'] = function(result) { + self.on_player_joined_game(); + }; + + map_handle_notif['card_played'] = function(result) { + self.incr_nbr_played_cards(); + + self.on_card_played(); + }; + + map_handle_notif['cards_collected'] = function(result) { + self.change_state('waiting_designation'); + + self.on_cards_collected(); + }; + + map_handle_notif['updated_score'] = function(result) { + self.score = result; + + self.on_updated_score(self.score); + }; + + /* }}} */ + + this.run = function() { + ws = new WebSocket('ws://' + document.location.hostname + ':1236'); + + ws.onopen = function() { + console.log('connection established'); + self.on_socket_open(); + }; + + ws.onclose = function() { + self.on_socket_close(); + }; + + ws.onmessage = function(evt) { + var message = JSON.parse(evt.data); + + if (message['type'] == 'notification') { + handle_notif(message['content']); + } else { + handle_response(message['content']); + } + }; + + ws.onerror = function(evt) { + console.log(evt); + self.on_socket_error(evt); + }; + + }; + + var handle_notif = function(notif) { + if (map_handle_notif[notif['op']]) { + map_handle_notif[notif['op']](notif['content']); + } else { + console.log('unhandled notif ' + notif); + } + }; + + var handle_response = function(response) { + var rq = request_queue.shift(); + + if (response['status'] != 0) { + alert(response['info']); + return; + } + + if (map_handle_response_ok[rq]) { + map_handle_response_ok[rq](response['result']) + } else { + console.log(evt); + } + }; + + this.gen_callback_white_card = function(index) { + return function() { + var request = { + 'op': 'play_white_card', + 'card_id': index, + }; + + request_queue.push('play_white_card'); + ws.send(JSON.stringify(request)); + }; + }; + + this.gen_callback_played_card = function(index) { + return function() { + var request = { + 'op': 'designate_card', + 'card_id': index, + }; + + request_queue.push('designate_card'); + ws.send(JSON.stringify(request)); + }; + }; + + this.join_game = function(game_name) { + var request = { + 'op': 'join_game', + 'game_name': game_name, + 'lang': lang, + }; + request_queue.push('join_game'); + ws.send(JSON.stringify(request)); + }; + + this.pick_black_card = function() { + var request = { + 'op': 'pick_black_card', + }; + request_queue.push('pick_black_card'); + ws.send(JSON.stringify(request)); + }; + + this.collect_cards = function() { + var request = { + 'op': 'collect_cards', + }; + request_queue.push('collect_cards'); + ws.send(JSON.stringify(request)); + }; + + this.request_show_cards = function() { + var request = { + 'op': 'view_player_cards', + }; + + request_queue.push('view_player_cards'); + ws.send(JSON.stringify(request)); + }; + this.request_show_black_card = function() { + var request = { + 'op': 'view_black_card', + }; + + request_queue.push('view_black_card'); + ws.send(JSON.stringify(request)); + }; + this.request_show_played_cards = function() { + var request = { + 'op': 'view_played_cards', + }; + + request_queue.push('view_played_cards'); + ws.send(JSON.stringify(request)); + }; +}; + +var swst; + +$(document).ready(function() { + swst = new SwiftStory(); +}); diff --git a/webapp/swiftstory-config.js b/webapp/swiftstory-config.js new file mode 100644 index 0000000..9a6be3c --- /dev/null +++ b/webapp/swiftstory-config.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + var lang; + var hostname = document.location.hostname; + + /* XXX replace this with your desired behaviour */ + if (hostname.substring(0, 3) === 'fr.') { + lang = 'fr'; + } else if (hostname.substring(0, 3) === 'en.') { + lang = 'en'; + } + + swst.set_lang(lang); +}); diff --git a/webapp/swiftstory-desktop.html b/webapp/swiftstory-desktop.html new file mode 100644 index 0000000..10706af --- /dev/null +++ b/webapp/swiftstory-desktop.html @@ -0,0 +1,21 @@ + + + + + SwiftStory + + + + + + + + + + +
      +
      +
        +
          + + diff --git a/webapp/swiftstory-desktop.js b/webapp/swiftstory-desktop.js new file mode 100644 index 0000000..af86e83 --- /dev/null +++ b/webapp/swiftstory-desktop.js @@ -0,0 +1,88 @@ +$(document).ready(function() { + $('#btn_join').click(function() { + var game_name = prompt('Name of the game'); + + swst.join_game(game_name); + }); + + $('#btn_pick_black').click(function() { + swst.pick_black_card(); + }); + + $('#btn_collect').click(function() { + swst.collect_cards(); + }); + + swst.on_socket_open = function() { + $('#btn_join').show(); + }; + + swst.on_join_game_ok = function(state) { + $('#btn_join').hide(); + $('#btn_pick_black').show(); + $('#white_cards').show(); + }; + + swst.on_show_white_card = function(idx, desc) { + identifier = 'white_card_' + idx; + content = '
        • ' + desc + '
        • '; + + $('#white_cards').append(content); + + $('#' + identifier).dblclick(this.gen_callback_white_card(idx)); + }; + + swst.on_show_played_card = function(idx, desc) { + identifier = 'played_card_' + idx; + + content = '
        • ' + desc + '
        • '; + + $('#played_cards').append(content); + + $('#' + identifier).dblclick(this.gen_callback_played_card(idx)); + }; + + + swst.on_pick_black_card_ok = function() { + $('#btn_collect').show(); + $('#btn_pick_black').hide(); + }; + + swst.on_show_black_card = function(desc) { + $('#black_card').show(); + $('#black_card').html(desc); + }; + + + swst.on_play_white_card_ok = function(idx) { + identifier = 'white_card_' + idx; + $('#' + identifier).remove(); + }; + + swst.on_designate_card_ok = function() { + $('#played_cards').empty(); + $('#played_cards').hide(); + $('#black_card').hide(); + $('#btn_collect').hide(); + $('#btn_pick_black').show(); + }; + + swst.on_collect_cards_ok = function() { + $('#btn_collect').hide(); + $('#played_cards').show(); + }; + + swst.on_judge_designed = function() { + $('#btn_pick_black').hide(); + }; + + swst.on_judge_needed = function() { + $('#btn_pick_black').show(); + }; + + swst.on_updated_score = function(score) { + console.log('new score: ' + score); + }; + + swst.run(); +}); diff --git a/webapp/swiftstory-mobile.css b/webapp/swiftstory-mobile.css new file mode 100644 index 0000000..796f190 --- /dev/null +++ b/webapp/swiftstory-mobile.css @@ -0,0 +1,147 @@ +@import url(http://fonts.googleapis.com/css?family=Special+Elite); +body { + font-family: "Special Elite", sans-serif; + background: #333333; + color: #dddddd; +} +header { + background: #222222; + position: fixed; + top: 0; + left: 0; + right: 0; + height: 50px; + z-index: 1; + border-bottom: 4px solid #000; + padding: 20px; + box-sizing: border-box; +} +header > span#score { + opacity: 0.7; +} +header > span#leave-room { + opacity: 0.7; + float: right; + cursor: pointer; +} +header > span#leave-room:hover { + opacity: 1; +} +.page { + padding: 70px 20px 120px; + margin: auto; + max-width: 650px; +} +#home { + padding-top: 20px; +} +.page:not(.current) { + display: none; +} +h1 { + font-weight: normal; + font-size: 4.5em; + text-align: center; + text-shadow: 0 5px 0 #000; +} +h2 { + text-align: center; + font-weight: normal; + color: #999999; + font-size: 2em; +} +button { + outline: none; + font-size: 2em; + width: 100%; + cursor: pointer; + font-family: "Special Elite", sans-serif; +} +button.card { + color: #222222; + background: #dddddd; + border: 4px solid #999; + box-shadow: 0 5px 0 #999; + padding: 20px; + border-radius: 10px; + animation: appear .3s; +} +button.card:not(:last-child) { + margin-bottom: 20px; +} +button.card:active, button.card.black:active { + transform: translateY(5px); + box-shadow: none; +} +button.card.black { + background: #222222; + color: #dddddd; + border: 4px solid #000; + box-shadow: 0 5px 0 #000; +} +button.card:not(.active) { + opacity: 0.7; +} +button.card:hover { + opacity: 1.0; +} +div.card-list.read-only > button.card { + cursor: default; +} +div.card-list.read-only > button.card:hover { + opacity: 0.7; +} +div.card-list.read-only > button.card:active { + transform: none; + box-shadow: 0 5px 0 #999; +} +div.card-list.read-only > button.card.black:active { + box-shadow: 0 5px 0 #000; +} +.bottom { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 100px; + box-sizing: border-box; +} +div.bottom { + padding: 20px; + font-size: 1.5em; + background: #222222; + color: #dddddd; + border: 4px solid #000; +} +button.bottom { + font-size: 2.5em; + color: #222222; + border: 4px solid #455A64; + background: #78909C; + transition: .3s; +} +button.bottom:hover { + background: #455A64; + font-size: 2.7em; +} +.message { + padding: 40px; + font-size: 2.5em; + text-align: center; + text-shadow: 0 5px 0 #000; +} +@media screen and (max-width: 600px) { + h1 { + font-size: 3em; + } +} +@keyframes appear { + 0% { + opacity: 0; + transform: translateX(-400px); + } + 100% { + transform: translateX(0); + opacity: 0.7; + } +} \ No newline at end of file diff --git a/webapp/swiftstory-mobile.html b/webapp/swiftstory-mobile.html new file mode 100644 index 0000000..a0407d4 --- /dev/null +++ b/webapp/swiftstory-mobile.html @@ -0,0 +1,41 @@ + + + + + + SwiftStory + + + + + + + + +
          + +
          +

          SwiftStory

          +

          We're not out of the woods yet.

          + +
          +
          +
          +
          + +
          +
          You have 0 cards!
          +
          +
          +
          + +
          Pick the best card...
          +
          Choose a card...
          +
          Waiting for judge...
          + +
          + + diff --git a/webapp/swiftstory-mobile.js b/webapp/swiftstory-mobile.js new file mode 100644 index 0000000..b05193c --- /dev/null +++ b/webapp/swiftstory-mobile.js @@ -0,0 +1,155 @@ +$(document).ready(function() { + var $home = $("#home"); + var $game = $("#game"); + var $become_judge = $('[data-state="become-judge"]'); + var $judge_collect = $('[data-state="judge-collect"]'); + var $judge_choose = $('[data-state="judge-choose"]'); + var $player_choose = $('[data-state="player-choose"]'); + var $player_wait = $('[data-state="player-wait"]'); + var $leave_room = $('#leave-room'); + var $all = $("[data-state]"); + var $join_btn = $("#join-btn"); + var $become_judge_btn = $("#become-judge-btn"); + var $judge_collect_btn = $("#judge-collect-btn"); + var $black_card = $("#black-card"); + var $played_card_number = $("#played-card-number"); + var $header = $("header"); + var $white_cards = $('#white-cards'); + var $played_cards = $('#played-cards'); + var $score_value = $('#score-value'); + + $leave_room.click(function () { + window.location.reload(); + }); + + $become_judge_btn.click(function() { + swst.pick_black_card(); + }); + + $join_btn.click(function () { + swst.join_game(prompt('Name of the game')); + }); + + $judge_collect_btn.click(function() { + swst.collect_cards(); + }); + + swst.on_socket_open = function() { + $join_btn.show(); + }; + + swst.on_join_game_ok = function() { + $header.show(); + $home.removeClass("current"); + $game.addClass("current"); + $all.hide(); + }; + + swst.on_change_state = function(state) { + $all.hide(); + + switch (state) { + case 'waiting_judge': + $become_judge.show(); + $white_cards.attr('disabled', true); + $white_cards.addClass('read-only'); + break; + case 'waiting_designation': + if (swst.is_judge()) { + $judge_choose.show(); + $played_cards.removeAttr('disabled'); + $played_cards.removeClass('read-only'); + } else { + $player_wait.show(); + $white_cards.attr('disabled', true); + $white_cards.addClass('read-only'); + } + break; + case 'waiting_collection': + if (swst.is_judge()) { + $judge_collect.show(); + $white_cards.attr('disabled', true); + $white_cards.addClass('read-only'); + } else { + $player_choose.show(); + $white_cards.removeAttr('disabled'); + $white_cards.removeClass('read-only'); + } + break; + default: + console.log('unhandled state'); + break; + } + }; + + swst.on_show_white_card = function(idx, desc) { + var identifier = 'white-card-' + idx; + var content = ''; + $white_cards.append(content); + var self = this; + $('#' + identifier).click(function () { + var $this = $(this); + if (!$white_cards.attr('disabled')) { + if ($this.hasClass("active")) { + swst.get_white_card_event($this.prop('name'))(); + } else { + $white_cards.find("> .card").removeClass("active"); + $this.addClass("active"); + } + } + }); + }; + + swst.on_show_played_card = function(idx, desc) { + var identifier = 'played-card-' + idx; + var content = ''; + $played_cards.append(content); + var self = this; + $('#' + identifier).click(function () { + var $this = $(this); + if (!$played_cards.attr('disabled')) { + if ($this.hasClass("active")) { + swst.get_played_card_event($this.prop('name'))(); + } else { + $played_cards.find("> .card").removeClass("active"); + $this.addClass("active"); + } + } + }); + }; + + swst.on_show_black_card = function(desc) { + $('#black-card').html(desc); + }; + + swst.on_play_white_card_ok = function(idx) { + $white_cards.attr('disabled', true); + $white_cards.addClass('read-only'); + + $player_wait.show(); + + $('#white-card-' + idx).remove(); + }; + + swst.on_updated_score = function(score) { + $score_value.text(score); + }; + + swst.on_change_nbr_played_cards = function(nbr) { + $played_card_number.text(nbr); + }; + + swst.on_collect_cards_ok = function() { + $white_cards.hide(); + $played_cards.show(); + }; + + swst.on_designate_card_ok = function(idx) { + $played_cards.empty(); + + $played_cards.hide(); + $white_cards.show(); + }; + + swst.run(); +}); -- cgit v1.2.3