Giter Club home page Giter Club logo

spirit-island's People

Contributors

abyala avatar

Stargazers

Todd Ginsberg avatar  avatar

Watchers

 avatar

spirit-island's Issues

Record the board each player used in a saved game

Data format changes to {:players {:spirit s, :board b, :rating r} with the board being a keyword.

CLI format changes from record-game win 7 england=4 Andrew=starlight,4 to record-game win 7 england=4 Andrew=starlight,e,4. Board comes before rating.

Test that parsing old data supports a missing board.

CLI prints full usage for all commands

Always print the full usage for all commands, both for the base help message or when there is a parser error in a command execution. Currently only affects create-game and record-game.

Support spirit aspects

Metadata for a spirit should support an optional map of {:aspects {:s {:name n}}}.

CLI for create-game should suggest a spirit with an optional aspect; it should also support base spirits too.

CLI for record-game should change from Andrew=river,d,4 to Andrew=river,travel,d,4 or Andrew=river,base,d,4 or Andrew=river,,d,4.

User game data should support {name {:spirit s, :aspect :a, :board :b, :rating n}} with :aspect being nil or missing if the base spirit is used.

record-game supports multiple spirits per player

Need to update:

  • CLI data for record-game command
  • Data format either changes to a map from player to all of the spirits as a collection or a simple collection of players where the player-id is not unique (probably).

Print basic game stats

Options include:

  • Stats for all games with a player
  • Stats for all games with a player playing a spirit
  • Stats for all games against an adversary

For now, print out the number of games and the win rate.

Not currently supporting boards or adversary levels.

CLI supports ditto (") command

Certain operations (mostly create-game for now) should support the ditto operation.

Support requires:

  • State includes an optional :previous-request string
  • run-cli by default clears out that string after every requests
  • CLI function validate-state ensures that a passed-in state meets the necessary structure - for now, it has non-nil keys of :metadata and :users
  • execute function becomes more complex and can return:
    a. nil - success and no change to state, other than clearing out the ditto message
    b. :exit - special code to exit the CLI
    c. preserve-request - special code to retain the state but also set the previous-command field
    d. map with the field state to provide an updated state and other information; in this case, an optional :preserve-request flag, so long as the state passes validation
    e. map without the field state - an updated state, so long as it passes validation
  • run-cli checks the response from execute and performs as expected
  • Simplify all existing functions to not return the state if nothing changed, or to return :exit for the exit command
  • Enable create-game preserve the request if it passes validation

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.