Exemplo n.º 1
0
def run(two_dice: bool) -> pd.DataFrame:
    """
    Run the full analysis on all cards.
    """
    # The factory cards depend on the other cards in your hand.
    # Analyze using one of each kind of card they depend on.
    hand = [cards.WheatField(), cards.Ranch(), cards.Forest()]
    return pd.DataFrame({
        "Card": [card.name for card in cards.distinct_cards],
        "Expected coins per roll (2p)": [
            gross_expected_value(card, hand, two_dice, num_players=2)
            for card in cards.distinct_cards
        ],
        "Expected coins per roll (3p)": [
            gross_expected_value(card, hand, two_dice, num_players=3)
            for card in cards.distinct_cards
        ],
        "Expected coins per roll (4p)": [
            gross_expected_value(card, hand, two_dice, num_players=4)
            for card in cards.distinct_cards
        ],
        "Minimum rolls for payoff (4p)": [
            fastest_payoff(card, hand, num_players=4)
            for card in cards.distinct_cards
        ],
        "Expected rolls for payoff (4p)": [
            expected_payoff(card, hand, two_dice, num_players=4)
            for card in cards.distinct_cards
        ]
    })
Exemplo n.º 2
0
def fast_train_to_big_cheese():
    return Strategy(
        buy=_from_build_order([
            cards.Ranch(),
            cards.Ranch(),
            cards.Ranch(),
            cards.Ranch(),
            cards.TrainStation(),
            cards.CheeseFactory(),
            cards.CheeseFactory(),
            cards.CheeseFactory(),
            cards.RadioTower(),
            cards.AmusementPark(),
            cards.ShoppingMall(),
        ]),
        roll_two=roll_two_always_after_train_station)
Exemplo n.º 3
0
def highest_margin():
    return Strategy(
        buy=_from_build_order([
            cards.Ranch(),
            cards.WheatField(),
            cards.Ranch(),
            cards.Ranch(),
            cards.Stadium(),
            cards.WheatField(),
            cards.Ranch(),
            cards.WheatField(),
            cards.RadioTower(),
            cards.WheatField(),
            cards.ShoppingMall(),
            cards.TrainStation(),
            cards.AmusementPark(),
        ]),
        roll_two=roll_two_never)
Exemplo n.º 4
0
def big_convenience_store():
    return Strategy(
        buy=_from_build_order([
            cards.WheatField(),
            cards.Ranch(),
            cards.Ranch(),
            cards.ConvenienceStore(),
            cards.ConvenienceStore(),
            cards.Ranch(),
            cards.ConvenienceStore(),
            cards.Forest(),
            cards.Bakery(),
            cards.ShoppingMall(),
            cards.ConvenienceStore(),
            cards.RadioTower(),
            cards.TrainStation(),
            cards.AmusementPark(),
        ]),
        roll_two=roll_two_never)
Exemplo n.º 5
0
def buy_everything():
    return Strategy(
        buy=_from_build_order([
            cards.WheatField(),
            cards.Ranch(),
            cards.Bakery(),
            cards.Cafe(),
            cards.ConvenienceStore(),
            cards.Forest(),
            cards.Stadium(),
            # cards.TvStation(),
            # cards.BusinessCenter(),
            cards.CheeseFactory(),
            cards.FurnitureFactory(),
            cards.AppleOrchard(),
            cards.TrainStation(),
            cards.Mine(),
            cards.FruitVegetableMarket(),
            cards.ShoppingMall(),
            cards.Mine(),
            cards.AmusementPark(),
            cards.RadioTower()
        ]),
        roll_two=roll_two_always_after_train_station)