Repository navigation
Deal and write the same in JavaScript as on .NET - #38
Closed
leonitousconforti wants to merge 8 commits into
Closed
leonitousconforti wants to merge 8 commits into
leonitousconforti wants to merge 8 commits into
Conversation
Owner
Author
|
Closing in favour of fixing these in Fable, so flip7 doesn't have to re-implement FSharp.Core:
The tests from this PR move to #39, which lists the ones that fail in JavaScript until those fixes ship. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes a seeded game compiled with Fable deal the cards it deals on .NET, and makes strategy and targeting strings read the same on both. Seeded games deal on .NET what they always have, only faster.
Deck.DrawWithmakes theRandomcalls FSharp.Core's shuffle makes and walks the Map to the card, where Fable's shuffle dealt other cardsList.minBykeeps the lastToString("R")writes them, keeping-0and writing exponents like1E-07and1E+21System.Random()instead ofRandom.Sharedon both platforms, so their five#if !FABLE_COMPILERblocks gomaxBy,maxandList.randomChoiceWithuses already agree, except where NaN is involvedChecked locally: fantomas, build, tests, pack, the Fable compile, and a seeded-game transcript that is identical on .NET, under jsc and on main. 525k draws take 149-162 ms, against 525-565 ms on main.