jjallaire / draftpod Goto Github PK
View Code? Open in Web Editor NEWDraft simulator for Magic the Gathering
Home Page: https://draftpod.org
License: MIT License
Draft simulator for Magic the Gathering
Home Page: https://draftpod.org
License: MIT License
bot color commit may have busted it: 3dfac4b
Now that we are specifying that the site is responsive on mobile devices (4378f90) we need to update our bootstrap html for the home and guide pages to behave properly on phones.
Still need to write a bit more about creating custom cubes
We used to clear out all of the pick piles (at least when not running under the simulator) however changed this in order to able to show bot colors:
It seems like we should be able to just compute the bot colors once and just store that.
Copy button currently doesn't work.
Used as a roadmap to others that want to work on improving the bots
Passing to the left for packs 1,3, right for pack 2
When we have sketchy connectivity and allow multiple pick transactions to be in flight at once we might be opening ourselves up to inconsistency (as the first transaction could fail and roll back, whereas subsequent transactions succeed).
We may need a more conservative model visa-vi the optimistic local writes of picks. Perhaps we actually need to put glass on the UI until the transaction completes? (with a suitable progress indicator).
Can result in a player being stuck in deckbuilding (due to picks_complete: true
but without their cards being moved into their deck.
Dump into BigQuery?
It would be great to be able to import from Deckbox as well as Decked Builder. From what I can see the standard CSV export from Deckbox has the info we need to match up to Scryfall data:
We will need the "Count", "Edition", and "Card Number" fields to do the import. I'll polk around a bit to see if anything in our current code needs to change significantly to accommodate this.
When starting a local draft on 1/20/19, we saw both Chrome and Firefox issue what it seemed like spurious client disconnected errors. We've disabled this validation for now pending investigation (004e23d) so that users aren't disrupted.
For non-mobile: can we elegantly identify split/multi-faced cards from:
Trigger for the onMouseOver would need updating.
We would need to set the transform, transform-origin, and margin-left properties programatically. The below achieved the proper orientation for regular split cards.
<div class="card-viewer" style="transform: rotate(90deg); transform-origin: left top; margin-left: 100%;"><img src="https://img.scryfall.com/cards/normal/front/8/f/8f1801f2-ea6e-4196-858e-2afc456cf6a0.jpg?1538879984"></div>
Note, this may result in some overlap in the pick area, but retains the placement of the stats info box.
Planar cards (from planechase) would require rotation handling, but nobody's going to be drafting those. Other card types should not require special handling. Meld could be handled just like transform.
For Mobile: Don't bother rotating splits. Layouts need working on for phones/tablets for the base cases first, then review to see about mods for double faced cards.
Would allow us to archive old multiplayer drafts once they are completed
Need to see which clients actually subscribe to the promise.
Currently, NavigatorStart.startDraft doesn't listen to the promise resolution and as a result can create a draft that can never be joined (b/c the packs aren't distributed).
Perhaps the solution to unjoinability is to just filter out drafts that have current_pack === 0 from the list (or even drafts with no start time)
So that development configurations work by default.
We should add another environment variable that turns on local images.
If we don't open-source the repo, we still need some way to have dialog w/ users about bugs, features, etc.
We've had QuotaExceededError for some clients using localStorage. Look at swapping in localForage with indexedDB.
try to handle in the router
Include references/links to other open-source projects we depend on.
Sometimes in multiplayer mode the second pack comes in and then blinks out (with one card being different). This can be repro'd with only a single-player at the table.
Investigate why this occurs.
At a minimum we should setup automated tests that run through several drafts end-to-end (single and multi-player ideally).
e.g. always BG rather than sometimes BG and sometimes GB
That will allow us to archive old multiplayer drafts.
Need to sort out how to chain the various promises together and still get errors reported.
Use same technique as we do for firestore
Looking at the sets-xxx.js, it seems this should be able to be generated on the fly and not require hard coding. The main point seems to generate the booster pack content. Scryfall doesn’t offer this data but this site does:
There is a JS api for this site: mtg-sdk-javascript
{ "set":{ "code":"KTK", "name":"Khans of Tarkir", "type":"expansion", "border":"black", "mkm_id":1495, "booster":[ [ "rare", "mythic rare" ], "uncommon", "uncommon", "uncommon", "common", "common", "common", "common", "common", "common", "common", "common", "common", "common", "land", "marketing" ], "mkm_name":"Khans of Tarkir", "releaseDate":"2014-09-26", "magicCardsInfoCode":"ktk", "block":"Khans of Tarkir" } }
This should be readily parsed into the existing data forms.
Should this be persisted in our firebase store, or just st generated on first call? The overhead should be tiny thus storing might be overkill.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.