Git Product home page Git Product logo

dominion_sim's People

Contributors

striglia avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dominion_sim's Issues

Add "played" stack to Deck

Since some cards depend on the cards that have been played this turn, there needs to be an intermediate between hand and discard.

Implement Moron player class

Implement a player which buys duchies, silver and copper (in that order). This should be beat by the Money player arbitrarily close to every game.

Implement Money player class

Implement player class which buys Provices, Gold and Silver (in that order). Should beat Moron essentially every game.

Buy card method

Add method which checks can_buy, debits the current treasure count and adds the chosen card to the discard pile. For now, force this to discard, although eventually this is a card-level method.

Fix failure to buy

Current tests of Moron vs Money result in neither player ever buying! Likely an issue with calculation of buys or treasure, resulting in _can_buy(card) always returning False.

Build harness for repeated games

Write harness for repeatedly playing two players against each other. Should track stats per game. Would be cute to use multiprocessing to speed up games.

Store VP per turn

Track the VP at the end of each turn for each player. Return at end of every game for future analysis.

Add action step

Add action helpers at deck and player level (like can_buy and buy_card).

Add library

Requires knowledge of size of current hand to play action

Add can_buy(card) method

For a given deck, use treasure property and card cost to determine whether a card can be bought.

Test Moron vs Money

Test that Money wins >= 99 of 100 games. This conveniently stress tests the engine. For now, manually run 100 games in a loop. Later this will. E built out properly.

Add Mine

Easy enough just need to decide how best to start building out player logic for more complicated card plays that require deck knowledge.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.