This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local _ = require("moses") | |
local stats = require("stats") | |
local seed = 1 | |
local HLEN = 5 | |
local NUM_CARDS_IN_DECK = 52 | |
local TOTAL_HANDS = NUM_CARDS_IN_DECK - HLEN + 1 | |
local ranks = {nil, "2","3","4","5","6","7","8","9","T","J","Q","K","A"} | |
-- alt_rankmap is only for testing Ace-low straights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
from random import shuffle, seed | |
from itertools import product | |
from collections import Counter | |
#seed(100) | |
ranks = list('23456789TJQKA') | |
alt_ranks = list('A23456789TJQK') | |
suits = list('CSHD') | |
new_deck = list(product(ranks, suits)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import webapp2 | |
import os, os.path | |
import json | |
import logging | |
import time | |
import random | |
from google.appengine.ext.webapp import template, util |