trackler 2.2.1.64 → 2.2.1.65
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/all-your-base/canonical-data.json +7 -7
- data/tracks/c/config.json +1 -1
- data/tracks/csharp/config.json +10 -0
- data/tracks/csharp/docs/GENERATORS.md +3 -3
- data/tracks/csharp/exercises/Exercises.sln +8 -2
- data/tracks/csharp/exercises/accumulate/Accumulate.csproj +3 -3
- data/tracks/csharp/exercises/acronym/Acronym.csproj +3 -3
- data/tracks/csharp/exercises/all-your-base/AllYourBase.csproj +3 -3
- data/tracks/csharp/exercises/allergies/Allergies.csproj +3 -3
- data/tracks/csharp/exercises/alphametics/Alphametics.csproj +3 -3
- data/tracks/csharp/exercises/anagram/Anagram.csproj +3 -3
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.csproj +3 -3
- data/tracks/csharp/exercises/bank-account/BankAccount.csproj +3 -3
- data/tracks/csharp/exercises/beer-song/BeerSong.csproj +3 -3
- data/tracks/csharp/exercises/binary-search-tree/BinarySearchTree.csproj +3 -3
- data/tracks/csharp/exercises/binary-search/BinarySearch.csproj +3 -3
- data/tracks/csharp/exercises/bob/Bob.csproj +3 -3
- data/tracks/csharp/exercises/book-store/BookStore.csproj +3 -3
- data/tracks/csharp/exercises/bowling/Bowling.csproj +3 -3
- data/tracks/csharp/exercises/bracket-push/BracketPush.csproj +3 -3
- data/tracks/csharp/exercises/change/Change.csproj +3 -3
- data/tracks/csharp/exercises/circular-buffer/CircularBuffer.csproj +3 -3
- data/tracks/csharp/exercises/clock/Clock.csproj +3 -3
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +3 -3
- data/tracks/csharp/exercises/complex-numbers/ComplexNumbers.csproj +3 -3
- data/tracks/csharp/exercises/connect/Connect.csproj +3 -3
- data/tracks/csharp/exercises/crypto-square/CryptoSquare.csproj +3 -3
- data/tracks/csharp/exercises/custom-set/CustomSet.csproj +3 -3
- data/tracks/csharp/exercises/diamond/Diamond.csproj +3 -3
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.csproj +3 -3
- data/tracks/csharp/exercises/diffie-hellman/DiffieHellman.csproj +3 -3
- data/tracks/csharp/exercises/dominoes/Dominoes.csproj +3 -3
- data/tracks/csharp/exercises/dot-dsl/DotDsl.csproj +3 -3
- data/tracks/csharp/exercises/error-handling/ErrorHandling.csproj +3 -3
- data/tracks/csharp/exercises/etl/Etl.csproj +3 -3
- data/tracks/csharp/exercises/flatten-array/FlattenArray.csproj +3 -3
- data/tracks/csharp/exercises/food-chain/FoodChain.csproj +3 -3
- data/tracks/csharp/exercises/forth/Forth.csproj +3 -3
- data/tracks/csharp/exercises/gigasecond/Gigasecond.csproj +3 -3
- data/tracks/csharp/exercises/go-counting/GoCounting.csproj +3 -3
- data/tracks/csharp/exercises/grade-school/GradeSchool.csproj +3 -3
- data/tracks/csharp/exercises/grains/Grains.csproj +3 -3
- data/tracks/csharp/exercises/grep/Grep.csproj +3 -3
- data/tracks/csharp/exercises/hamming/Hamming.csproj +3 -3
- data/tracks/csharp/exercises/hangman/Hangman.csproj +3 -3
- data/tracks/csharp/exercises/hello-world/HelloWorld.csproj +3 -3
- data/tracks/csharp/exercises/house/House.csproj +3 -3
- data/tracks/csharp/exercises/isbn-verifier/IsbnVerifier.csproj +1 -1
- data/tracks/csharp/exercises/isogram/Isogram.csproj +3 -3
- data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.csproj +3 -3
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProduct.csproj +3 -3
- data/tracks/csharp/exercises/leap/Leap.csproj +3 -3
- data/tracks/csharp/exercises/ledger/Ledger.csproj +3 -3
- data/tracks/csharp/exercises/linked-list/LinkedList.csproj +3 -3
- data/tracks/csharp/exercises/list-ops/ListOps.csproj +3 -3
- data/tracks/csharp/exercises/luhn/Luhn.csproj +3 -3
- data/tracks/csharp/exercises/markdown/Markdown.csproj +3 -3
- data/tracks/csharp/exercises/matrix/Matrix.csproj +3 -3
- data/tracks/csharp/exercises/meetup/Meetup.csproj +3 -3
- data/tracks/csharp/exercises/minesweeper/Minesweeper.csproj +3 -3
- data/tracks/csharp/exercises/nth-prime/NthPrime.csproj +3 -3
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.csproj +3 -3
- data/tracks/csharp/exercises/ocr-numbers/OcrNumbers.csproj +3 -3
- data/tracks/csharp/exercises/palindrome-products/PalindromeProducts.csproj +3 -3
- data/tracks/csharp/exercises/pangram/Pangram.csproj +3 -3
- data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.csproj +3 -3
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.csproj +3 -3
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.csproj +3 -3
- data/tracks/csharp/exercises/phone-number/PhoneNumber.csproj +3 -3
- data/tracks/csharp/exercises/pig-latin/PigLatin.csproj +3 -3
- data/tracks/csharp/exercises/poker/Poker.csproj +3 -3
- data/tracks/csharp/exercises/pov/Pov.csproj +3 -3
- data/tracks/csharp/exercises/prime-factors/PrimeFactors.csproj +3 -3
- data/tracks/csharp/exercises/protein-translation/ProteinTranslation.csproj +3 -3
- data/tracks/csharp/exercises/proverb/Proverb.csproj +3 -3
- data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTriplet.csproj +3 -3
- data/tracks/csharp/exercises/queen-attack/QueenAttack.csproj +3 -3
- data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipher.csproj +3 -3
- data/tracks/csharp/exercises/raindrops/Raindrops.csproj +3 -3
- data/tracks/csharp/exercises/react/React.csproj +3 -3
- data/tracks/csharp/exercises/rectangles/Rectangles.csproj +3 -3
- data/tracks/csharp/exercises/reverse-string/Example.cs +10 -0
- data/tracks/csharp/exercises/reverse-string/README.md +3 -0
- data/tracks/csharp/exercises/reverse-string/ReverseString.cs +9 -0
- data/tracks/csharp/exercises/reverse-string/ReverseString.csproj +17 -0
- data/tracks/csharp/exercises/reverse-string/ReverseStringTest.cs +36 -0
- data/tracks/csharp/exercises/rna-transcription/RnaTranscription.csproj +3 -3
- data/tracks/csharp/exercises/robot-name/RobotName.csproj +3 -3
- data/tracks/csharp/exercises/robot-simulator/RobotSimulator.csproj +3 -3
- data/tracks/csharp/exercises/roman-numerals/RomanNumerals.csproj +3 -3
- data/tracks/csharp/exercises/rotational-cipher/RotationalCipher.csproj +3 -3
- data/tracks/csharp/exercises/run-length-encoding/RunLengthEncoding.csproj +3 -3
- data/tracks/csharp/exercises/saddle-points/SaddlePoints.csproj +3 -3
- data/tracks/csharp/exercises/say/Say.csproj +3 -3
- data/tracks/csharp/exercises/scale-generator/ScaleGenerator.csproj +3 -3
- data/tracks/csharp/exercises/scrabble-score/ScrabbleScore.csproj +3 -3
- data/tracks/csharp/exercises/secret-handshake/SecretHandshake.csproj +3 -3
- data/tracks/csharp/exercises/series/Series.csproj +3 -3
- data/tracks/csharp/exercises/sgf-parsing/SgfParsing.csproj +3 -3
- data/tracks/csharp/exercises/sieve/Sieve.csproj +3 -3
- data/tracks/csharp/exercises/simple-cipher/SimpleCipher.csproj +3 -3
- data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedList.csproj +3 -3
- data/tracks/csharp/exercises/space-age/SpaceAge.csproj +3 -3
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +3 -3
- data/tracks/csharp/exercises/strain/Strain.csproj +3 -3
- data/tracks/csharp/exercises/sublist/Sublist.csproj +3 -3
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.csproj +3 -3
- data/tracks/csharp/exercises/tournament/Tournament.csproj +3 -3
- data/tracks/csharp/exercises/transpose/Transpose.csproj +3 -3
- data/tracks/csharp/exercises/tree-building/TreeBuilding.csproj +3 -3
- data/tracks/csharp/exercises/triangle/Triangle.csproj +3 -3
- data/tracks/csharp/exercises/twelve-days/TwelveDays.csproj +3 -3
- data/tracks/csharp/exercises/two-bucket/TwoBucket.csproj +3 -3
- data/tracks/csharp/exercises/two-fer/TwoFer.csproj +3 -3
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.csproj +3 -3
- data/tracks/csharp/exercises/word-count/WordCount.csproj +3 -3
- data/tracks/csharp/exercises/word-search/WordSearch.csproj +3 -3
- data/tracks/csharp/exercises/wordy/Wordy.csproj +3 -3
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.csproj +3 -3
- data/tracks/csharp/exercises/zipper/Zipper.csproj +3 -3
- data/tracks/csharp/generators/CustomExercise.cs +9 -0
- data/tracks/csharp/generators/Exercise.cs +3 -110
- data/tracks/csharp/generators/ExerciseCollection.cs +33 -14
- data/tracks/csharp/generators/Exercises/Acronym.cs +1 -1
- data/tracks/csharp/generators/Exercises/AllYourBase.cs +1 -1
- data/tracks/csharp/generators/Exercises/Allergies.cs +1 -1
- data/tracks/csharp/generators/Exercises/Alphametics.cs +1 -1
- data/tracks/csharp/generators/Exercises/Anagram.cs +1 -1
- data/tracks/csharp/generators/Exercises/AtbashCipher.cs +1 -1
- data/tracks/csharp/generators/Exercises/BeerSong.cs +1 -1
- data/tracks/csharp/generators/Exercises/BinarySearch.cs +1 -1
- data/tracks/csharp/generators/Exercises/Bob.cs +1 -1
- data/tracks/csharp/generators/Exercises/BookStore.cs +1 -1
- data/tracks/csharp/generators/Exercises/Bowling.cs +1 -2
- data/tracks/csharp/generators/Exercises/BracketPush.cs +1 -1
- data/tracks/csharp/generators/Exercises/Clock.cs +1 -1
- data/tracks/csharp/generators/Exercises/CollatzConjecture.cs +1 -1
- data/tracks/csharp/generators/Exercises/ComplexNumbers.cs +1 -1
- data/tracks/csharp/generators/Exercises/Connect.cs +2 -4
- data/tracks/csharp/generators/Exercises/CryptoSquare.cs +1 -1
- data/tracks/csharp/generators/Exercises/Diamond.cs +9 -0
- data/tracks/csharp/generators/Exercises/DifferenceOfSquares.cs +1 -2
- data/tracks/csharp/generators/Exercises/Dominoes.cs +1 -1
- data/tracks/csharp/generators/Exercises/Etl.cs +1 -1
- data/tracks/csharp/generators/Exercises/FlattenArray.cs +1 -2
- data/tracks/csharp/generators/Exercises/FoodChain.cs +1 -1
- data/tracks/csharp/generators/Exercises/Gigasecond.cs +1 -1
- data/tracks/csharp/generators/Exercises/Grains.cs +1 -1
- data/tracks/csharp/generators/Exercises/Hamming.cs +1 -1
- data/tracks/csharp/generators/Exercises/HelloWorld.cs +1 -1
- data/tracks/csharp/generators/Exercises/House.cs +1 -1
- data/tracks/csharp/generators/Exercises/IsbnVerifier.cs +2 -4
- data/tracks/csharp/generators/Exercises/Isogram.cs +1 -1
- data/tracks/csharp/generators/Exercises/KindergartenGarden.cs +1 -1
- data/tracks/csharp/generators/Exercises/LargestSeriesProduct.cs +1 -1
- data/tracks/csharp/generators/Exercises/Leap.cs +1 -1
- data/tracks/csharp/generators/Exercises/Luhn.cs +1 -1
- data/tracks/csharp/generators/Exercises/Meetup.cs +1 -1
- data/tracks/csharp/generators/Exercises/Minesweeper.cs +1 -1
- data/tracks/csharp/generators/Exercises/NthPrime.cs +1 -1
- data/tracks/csharp/generators/Exercises/NucleotideCount.cs +1 -1
- data/tracks/csharp/generators/Exercises/OcrNumbers.cs +1 -1
- data/tracks/csharp/generators/Exercises/Pangram.cs +1 -1
- data/tracks/csharp/generators/Exercises/PascalsTriangle.cs +1 -1
- data/tracks/csharp/generators/Exercises/PerfectNumbers.cs +1 -1
- data/tracks/csharp/generators/Exercises/PhoneNumber.cs +1 -1
- data/tracks/csharp/generators/Exercises/PigLatin.cs +1 -1
- data/tracks/csharp/generators/Exercises/Poker.cs +1 -1
- data/tracks/csharp/generators/Exercises/PrimeFactors.cs +1 -1
- data/tracks/csharp/generators/Exercises/QueenAttack.cs +1 -1
- data/tracks/csharp/generators/Exercises/RailFenceCipher.cs +1 -1
- data/tracks/csharp/generators/Exercises/Raindrops.cs +1 -1
- data/tracks/csharp/generators/Exercises/ReverseString.cs +6 -0
- data/tracks/csharp/generators/Exercises/RnaTranscription.cs +1 -1
- data/tracks/csharp/generators/Exercises/RomanNumerals.cs +1 -1
- data/tracks/csharp/generators/Exercises/RotationalCipher.cs +1 -1
- data/tracks/csharp/generators/Exercises/RunLengthEncoding.cs +1 -1
- data/tracks/csharp/generators/Exercises/SaddlePoints.cs +1 -1
- data/tracks/csharp/generators/Exercises/Say.cs +1 -1
- data/tracks/csharp/generators/Exercises/ScrabbleScore.cs +1 -1
- data/tracks/csharp/generators/Exercises/SecretHandshake.cs +1 -1
- data/tracks/csharp/generators/Exercises/Sieve.cs +1 -1
- data/tracks/csharp/generators/Exercises/SpaceAge.cs +1 -1
- data/tracks/csharp/generators/Exercises/SumOfMultiples.cs +1 -1
- data/tracks/csharp/generators/Exercises/Tournament.cs +1 -1
- data/tracks/csharp/generators/Exercises/Transpose.cs +1 -1
- data/tracks/csharp/generators/Exercises/Triangle.cs +1 -2
- data/tracks/csharp/generators/Exercises/TwoBucket.cs +1 -1
- data/tracks/csharp/generators/Exercises/TwoFer.cs +1 -1
- data/tracks/csharp/generators/Exercises/WordCount.cs +1 -1
- data/tracks/csharp/generators/Exercises/Wordy.cs +1 -1
- data/tracks/csharp/generators/GeneratorExercise.cs +114 -0
- data/tracks/csharp/generators/GeneratorStatus.cs +11 -0
- data/tracks/csharp/generators/Generators.csproj +1 -1
- data/tracks/csharp/generators/Input/CanonicalDataFile.cs +11 -9
- data/tracks/csharp/generators/Input/CanonicalDataParser.cs +5 -6
- data/tracks/csharp/generators/Input/ConfigFile.cs +29 -0
- data/tracks/csharp/generators/MissingDataExercise.cs +9 -0
- data/tracks/csharp/generators/Options.cs +18 -5
- data/tracks/csharp/generators/Output/ExerciseWriter.cs +5 -8
- data/tracks/csharp/generators/Output/NameExtensions.cs +3 -1
- data/tracks/csharp/generators/Program.cs +54 -15
- data/tracks/csharp/generators/UnimplementedExercise.cs +9 -0
- data/tracks/dart/README.md +6 -0
- data/tracks/dart/config.json +1 -1
- data/tracks/fsharp/config.json +24 -0
- data/tracks/fsharp/exercises/Exercises.sln +12 -0
- data/tracks/fsharp/exercises/accumulate/Accumulate.fsproj +4 -4
- data/tracks/fsharp/exercises/acronym/Acronym.fsproj +4 -4
- data/tracks/fsharp/exercises/all-your-base/AllYourBase.fsproj +4 -4
- data/tracks/fsharp/exercises/all-your-base/AllYourBaseTest.fs +5 -5
- data/tracks/fsharp/exercises/all-your-base/Example.fs +9 -7
- data/tracks/fsharp/exercises/allergies/Allergies.fsproj +4 -4
- data/tracks/fsharp/exercises/alphametics/Alphametics.fsproj +4 -4
- data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +32 -32
- data/tracks/fsharp/exercises/anagram/Anagram.fsproj +4 -4
- data/tracks/fsharp/exercises/atbash-cipher/AtbashCipher.fsproj +4 -4
- data/tracks/fsharp/exercises/bank-account/BankAccount.fsproj +4 -4
- data/tracks/fsharp/exercises/beer-song/BeerSong.fsproj +4 -4
- data/tracks/fsharp/exercises/binary-search-tree/BinarySearchTree.fsproj +4 -4
- data/tracks/fsharp/exercises/binary-search/BinarySearch.fsproj +4 -4
- data/tracks/fsharp/exercises/bob/Bob.fsproj +4 -4
- data/tracks/fsharp/exercises/book-store/BookStore.fsproj +4 -4
- data/tracks/fsharp/exercises/bowling/Bowling.fsproj +4 -4
- data/tracks/fsharp/exercises/bracket-push/BracketPush.fsproj +4 -4
- data/tracks/fsharp/exercises/change/Change.fsproj +4 -4
- data/tracks/fsharp/exercises/circular-buffer/CircularBuffer.fsproj +4 -4
- data/tracks/fsharp/exercises/clock/Clock.fsproj +4 -4
- data/tracks/fsharp/exercises/collatz-conjecture/CollatzConjecture.fs +3 -0
- data/tracks/fsharp/exercises/collatz-conjecture/CollatzConjecture.fsproj +23 -0
- data/tracks/fsharp/exercises/collatz-conjecture/CollatzConjectureTest.fs +33 -0
- data/tracks/fsharp/exercises/collatz-conjecture/Example.fs +15 -0
- data/tracks/fsharp/exercises/collatz-conjecture/Program.fs +1 -0
- data/tracks/fsharp/exercises/collatz-conjecture/README.md +32 -0
- data/tracks/fsharp/exercises/connect/Connect.fsproj +4 -4
- data/tracks/fsharp/exercises/connect/ConnectTest.fs +35 -35
- data/tracks/fsharp/exercises/crypto-square/CryptoSquare.fsproj +4 -4
- data/tracks/fsharp/exercises/custom-set/CustomSet.fsproj +4 -4
- data/tracks/fsharp/exercises/diamond/Diamond.fsproj +4 -4
- data/tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquares.fsproj +4 -4
- data/tracks/fsharp/exercises/diffie-hellman/DiffieHellman.fsproj +4 -4
- data/tracks/fsharp/exercises/dominoes/Dominoes.fsproj +4 -4
- data/tracks/fsharp/exercises/dot-dsl/DotDsl.fsproj +4 -4
- data/tracks/fsharp/exercises/error-handling/ErrorHandling.fsproj +4 -4
- data/tracks/fsharp/exercises/etl/Etl.fsproj +4 -4
- data/tracks/fsharp/exercises/etl/EtlTest.fs +39 -39
- data/tracks/fsharp/exercises/food-chain/FoodChain.fsproj +4 -4
- data/tracks/fsharp/exercises/forth/Forth.fsproj +4 -4
- data/tracks/fsharp/exercises/gigasecond/Gigasecond.fsproj +4 -4
- data/tracks/fsharp/exercises/go-counting/GoCounting.fsproj +4 -4
- data/tracks/fsharp/exercises/grade-school/GradeSchool.fsproj +4 -4
- data/tracks/fsharp/exercises/grains/Grains.fsproj +4 -4
- data/tracks/fsharp/exercises/grep/Grep.fsproj +4 -4
- data/tracks/fsharp/exercises/hamming/Hamming.fsproj +4 -4
- data/tracks/fsharp/exercises/hangman/Hangman.fsproj +4 -4
- data/tracks/fsharp/exercises/hello-world/HelloWorld.fsproj +4 -4
- data/tracks/fsharp/exercises/house/House.fsproj +4 -4
- data/tracks/fsharp/exercises/isogram/Isogram.fsproj +4 -4
- data/tracks/fsharp/exercises/kindergarten-garden/KindergartenGarden.fsproj +4 -4
- data/tracks/fsharp/exercises/largest-series-product/LargestSeriesProduct.fsproj +4 -4
- data/tracks/fsharp/exercises/leap/Leap.fsproj +4 -4
- data/tracks/fsharp/exercises/ledger/Ledger.fsproj +4 -4
- data/tracks/fsharp/exercises/lens-person/LensPerson.fsproj +4 -4
- data/tracks/fsharp/exercises/linked-list/LinkedList.fsproj +4 -4
- data/tracks/fsharp/exercises/list-ops/ListOps.fsproj +4 -4
- data/tracks/fsharp/exercises/luhn/Luhn.fsproj +4 -4
- data/tracks/fsharp/exercises/markdown/Markdown.fsproj +4 -4
- data/tracks/fsharp/exercises/matrix/Matrix.fsproj +4 -4
- data/tracks/fsharp/exercises/meetup/Meetup.fsproj +4 -4
- data/tracks/fsharp/exercises/minesweeper/Minesweeper.fsproj +4 -4
- data/tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs +50 -50
- data/tracks/fsharp/exercises/nth-prime/NthPrime.fsproj +4 -4
- data/tracks/fsharp/exercises/nucleotide-count/NucleotideCount.fsproj +4 -4
- data/tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs +12 -12
- data/tracks/fsharp/exercises/ocr-numbers/OcrNumbers.fsproj +4 -4
- data/tracks/fsharp/exercises/ocr-numbers/OcrNumbersTest.fs +58 -58
- data/tracks/fsharp/exercises/palindrome-products/PalindromeProducts.fsproj +4 -4
- data/tracks/fsharp/exercises/pangram/Pangram.fsproj +4 -4
- data/tracks/fsharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.fsproj +4 -4
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangle.fsproj +4 -4
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs +64 -7
- data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbers.fsproj +4 -4
- data/tracks/fsharp/exercises/phone-number/PhoneNumber.fsproj +4 -4
- data/tracks/fsharp/exercises/pig-latin/PigLatin.fsproj +4 -4
- data/tracks/fsharp/exercises/poker/Poker.fsproj +4 -4
- data/tracks/fsharp/exercises/pov/Pov.fsproj +4 -4
- data/tracks/fsharp/exercises/prime-factors/PrimeFactors.fsproj +4 -4
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslation.fsproj +4 -4
- data/tracks/fsharp/exercises/proverb/Proverb.fsproj +4 -4
- data/tracks/fsharp/exercises/pythagorean-triplet/PythagoreanTriplet.fsproj +4 -4
- data/tracks/fsharp/exercises/queen-attack/QueenAttack.fsproj +4 -4
- data/tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipher.fsproj +4 -4
- data/tracks/fsharp/exercises/raindrops/Raindrops.fsproj +4 -4
- data/tracks/fsharp/exercises/react/React.fsproj +4 -4
- data/tracks/fsharp/exercises/rectangles/Rectangles.fsproj +4 -4
- data/tracks/fsharp/exercises/reverse-string/Example.fs +5 -0
- data/tracks/fsharp/exercises/reverse-string/Program.fs +1 -0
- data/tracks/fsharp/exercises/reverse-string/README.md +3 -0
- data/tracks/fsharp/exercises/reverse-string/ReverseString.fs +3 -0
- data/tracks/fsharp/exercises/reverse-string/ReverseString.fsproj +23 -0
- data/tracks/fsharp/exercises/reverse-string/ReverseStringTest.fs +29 -0
- data/tracks/fsharp/exercises/rna-transcription/RnaTranscription.fsproj +4 -4
- data/tracks/fsharp/exercises/robot-name/RobotName.fsproj +4 -4
- data/tracks/fsharp/exercises/robot-simulator/RobotSimulator.fsproj +4 -4
- data/tracks/fsharp/exercises/roman-numerals/RomanNumerals.fsproj +4 -4
- data/tracks/fsharp/exercises/run-length-encoding/RunLengthEncoding.fsproj +4 -4
- data/tracks/fsharp/exercises/saddle-points/SaddlePoints.fsproj +4 -4
- data/tracks/fsharp/exercises/say/Say.fsproj +4 -4
- data/tracks/fsharp/exercises/scale-generator/ScaleGenerator.fsproj +4 -4
- data/tracks/fsharp/exercises/scrabble-score/ScrabbleScore.fsproj +4 -4
- data/tracks/fsharp/exercises/secret-handshake/SecretHandshake.fsproj +4 -4
- data/tracks/fsharp/exercises/series/Series.fsproj +4 -4
- data/tracks/fsharp/exercises/sgf-parsing/SgfParsing.fsproj +4 -4
- data/tracks/fsharp/exercises/sieve/Sieve.fsproj +4 -4
- data/tracks/fsharp/exercises/simple-cipher/SimpleCipher.fsproj +4 -4
- data/tracks/fsharp/exercises/simple-linked-list/SimpleLinkedList.fsproj +4 -4
- data/tracks/fsharp/exercises/space-age/SpaceAge.fsproj +4 -4
- data/tracks/fsharp/exercises/strain/Strain.fsproj +4 -4
- data/tracks/fsharp/exercises/sublist/Sublist.fsproj +4 -4
- data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiples.fsproj +4 -4
- data/tracks/fsharp/exercises/tournament/Tournament.fsproj +4 -4
- data/tracks/fsharp/exercises/transpose/Transpose.fsproj +4 -4
- data/tracks/fsharp/exercises/tree-building/TreeBuilding.fsproj +4 -4
- data/tracks/fsharp/exercises/triangle/Triangle.fsproj +4 -4
- data/tracks/fsharp/exercises/twelve-days/TwelveDays.fsproj +4 -4
- data/tracks/fsharp/exercises/two-bucket/TwoBucket.fsproj +4 -4
- data/tracks/fsharp/exercises/two-fer/TwoFer.fsproj +4 -4
- data/tracks/fsharp/exercises/variable-length-quantity/VariableLengthQuantity.fsproj +4 -4
- data/tracks/fsharp/exercises/word-count/WordCount.fsproj +4 -4
- data/tracks/fsharp/exercises/word-search/WordSearch.fsproj +4 -4
- data/tracks/fsharp/exercises/wordy/Wordy.fsproj +4 -4
- data/tracks/fsharp/exercises/zebra-puzzle/ZebraPuzzle.fsproj +4 -4
- data/tracks/fsharp/exercises/zipper/Zipper.fsproj +4 -4
- data/tracks/fsharp/generators/Common.fs +4 -1
- data/tracks/fsharp/generators/Generators.fs +29 -6
- data/tracks/fsharp/generators/Generators.fsproj +1 -1
- data/tracks/go/exercises/book-store/.meta/gen.go +54 -0
- data/tracks/go/exercises/book-store/book_store_test.go +0 -67
- data/tracks/go/exercises/book-store/cases_test.go +77 -0
- data/tracks/go/exercises/forth/cases_test.go +41 -6
- data/tracks/go/exercises/hamming/.meta/gen.go +16 -6
- data/tracks/go/exercises/hamming/cases_test.go +7 -7
- data/tracks/go/exercises/isbn-verifier/.meta/gen.go +44 -0
- data/tracks/go/exercises/isbn-verifier/cases_test.go +25 -0
- data/tracks/go/exercises/isbn-verifier/example.go +2 -2
- data/tracks/go/exercises/isbn-verifier/isbn_verifier_test.go +3 -22
- data/tracks/go/exercises/perfect-numbers/.meta/gen.go +88 -0
- data/tracks/go/exercises/perfect-numbers/.meta/hints.md +19 -0
- data/tracks/go/exercises/perfect-numbers/README.md +23 -2
- data/tracks/go/exercises/perfect-numbers/cases_test.go +89 -0
- data/tracks/go/exercises/perfect-numbers/example.go +4 -4
- data/tracks/go/exercises/perfect-numbers/perfect_numbers_test.go +13 -18
- data/tracks/go/exercises/wordy/.meta/gen.go +76 -0
- data/tracks/go/exercises/wordy/cases_test.go +111 -0
- data/tracks/go/exercises/wordy/wordy_test.go +7 -29
- data/tracks/groovy/config.json +4 -4
- data/tracks/haskell/exercises/all-your-base/package.yaml +1 -1
- data/tracks/haskell/exercises/all-your-base/test/Tests.hs +2 -2
- data/tracks/haskell/exercises/beer-song/README.md +1 -1
- data/tracks/haskell/exercises/forth/package.yaml +1 -1
- data/tracks/haskell/exercises/forth/test/Tests.hs +21 -3
- data/tracks/haskell/exercises/isbn-verifier/package.yaml +1 -1
- data/tracks/haskell/exercises/meetup/README.md +16 -12
- data/tracks/haskell/exercises/sum-of-multiples/README.md +3 -3
- data/tracks/javascript/exercises/bowling/README.md +6 -6
- data/tracks/javascript/exercises/bowling/bowling.spec.js +14 -14
- data/tracks/javascript/exercises/saddle-points/README.md +1 -1
- data/tracks/javascript/exercises/sum-of-multiples/README.md +1 -1
- data/tracks/javascript/exercises/two-bucket/two-bucket.spec.js +2 -2
- data/tracks/julia/config.json +6 -6
- data/tracks/python/.gitignore +2 -0
- data/tracks/python/config.json +14 -0
- data/tracks/python/exercises/binary-search-tree/README.md +71 -0
- data/tracks/python/exercises/binary-search-tree/binary_search_tree.py +14 -0
- data/tracks/python/exercises/binary-search-tree/binary_search_tree_test.py +58 -0
- data/tracks/python/exercises/binary-search-tree/example.py +61 -0
- data/tracks/python/exercises/go-counting/go_counting_test.py +23 -23
- data/tracks/python/exercises/minesweeper/example.py +10 -14
- data/tracks/python/exercises/minesweeper/minesweeper_test.py +108 -119
- data/tracks/rust/config.json +12 -0
- data/tracks/rust/exercises/beer-song/README.md +1 -1
- data/tracks/rust/exercises/proverb/README.md +5 -2
- data/tracks/rust/exercises/reverse-string/.gitignore +3 -0
- data/tracks/rust/exercises/reverse-string/Cargo.toml +6 -0
- data/tracks/rust/exercises/reverse-string/README.md +46 -0
- data/tracks/rust/exercises/reverse-string/example.rs +7 -0
- data/tracks/rust/exercises/reverse-string/src/lib.rs +3 -0
- data/tracks/rust/exercises/reverse-string/tests/reverse-string.rs +57 -0
- data/tracks/rust/exercises/sum-of-multiples/README.md +3 -3
- metadata +46 -3
- data/tracks/csharp/generators/Input/CanonicalDataOptions.cs +0 -8
@@ -2,41 +2,19 @@ package wordy
|
|
2
2
|
|
3
3
|
import "testing"
|
4
4
|
|
5
|
-
var tests = []struct {
|
6
|
-
q string
|
7
|
-
a int
|
8
|
-
ok bool
|
9
|
-
}{
|
10
|
-
{"What is 1 plus 1?", 2, true},
|
11
|
-
{"What is 53 plus 2?", 55, true},
|
12
|
-
{"What is -1 plus -10?", -11, true},
|
13
|
-
{"What is 123 plus 45678?", 45801, true},
|
14
|
-
{"What is 4 minus -12?", 16, true},
|
15
|
-
{"What is -3 multiplied by 25?", -75, true},
|
16
|
-
{"What is 33 divided by -3?", -11, true},
|
17
|
-
{"What is 1 plus 1 plus 1?", 3, true},
|
18
|
-
{"What is 1 plus 5 minus -2?", 8, true},
|
19
|
-
{"What is 20 minus 4 minus 13?", 3, true},
|
20
|
-
{"What is 17 minus 6 plus 3?", 14, true},
|
21
|
-
{"What is 2 multiplied by -2 multiplied by 3?", -12, true},
|
22
|
-
{"What is -3 plus 7 multiplied by -2?", -8, true},
|
23
|
-
{"What is -12 divided by 2 divided by -3?", 2, true},
|
24
|
-
{"What is 53 cubed?", 0, false},
|
25
|
-
{"Who is the president of the United States?", 0, false},
|
26
|
-
}
|
27
|
-
|
28
5
|
func TestAnswer(t *testing.T) {
|
29
6
|
for _, test := range tests {
|
30
|
-
switch
|
7
|
+
switch answer, ok := Answer(test.question); {
|
31
8
|
case !ok:
|
32
9
|
if test.ok {
|
33
|
-
t.
|
10
|
+
t.Fatalf("FAIL: %s\nAnswer(%q)\nreturned ok = false, expecting true.", test.description, test.question)
|
34
11
|
}
|
35
12
|
case !test.ok:
|
36
|
-
t.Errorf("
|
37
|
-
case
|
38
|
-
t.Errorf("
|
13
|
+
t.Errorf("FAIL: %s\nAnswer(%q)\nreturned %d, %t, expecting ok = false.", test.description, test.question, answer, ok)
|
14
|
+
case answer != test.answer:
|
15
|
+
t.Errorf("FAIL: %s\nAnswer(%q)\nreturned %d, expected %d.", test.description, test.question, answer, test.answer)
|
39
16
|
}
|
17
|
+
t.Logf("PASS: %s", test.description)
|
40
18
|
}
|
41
19
|
}
|
42
20
|
|
@@ -44,7 +22,7 @@ func TestAnswer(t *testing.T) {
|
|
44
22
|
func BenchmarkAnswer(b *testing.B) {
|
45
23
|
for i := 0; i < b.N; i++ {
|
46
24
|
for _, test := range tests {
|
47
|
-
Answer(test.
|
25
|
+
Answer(test.question)
|
48
26
|
}
|
49
27
|
}
|
50
28
|
}
|
data/tracks/groovy/config.json
CHANGED
@@ -81,7 +81,7 @@
|
|
81
81
|
"strings"
|
82
82
|
],
|
83
83
|
"unlocked_by": null,
|
84
|
-
"uuid": "
|
84
|
+
"uuid": "ca96b661-73b5-4a8c-92d6-ef98998c8b1a"
|
85
85
|
},
|
86
86
|
{
|
87
87
|
"core": false,
|
@@ -155,7 +155,7 @@
|
|
155
155
|
"mathematics"
|
156
156
|
],
|
157
157
|
"unlocked_by": null,
|
158
|
-
"uuid": "
|
158
|
+
"uuid": "3bb8573b-33bc-4823-a710-036030decb5c"
|
159
159
|
},
|
160
160
|
{
|
161
161
|
"core": false,
|
@@ -166,7 +166,7 @@
|
|
166
166
|
"strings"
|
167
167
|
],
|
168
168
|
"unlocked_by": null,
|
169
|
-
"uuid": "
|
169
|
+
"uuid": "df2eaff0-bcf2-47ab-bb56-dd4f84cc4a63"
|
170
170
|
},
|
171
171
|
{
|
172
172
|
"core": false,
|
@@ -179,7 +179,7 @@
|
|
179
179
|
"searching"
|
180
180
|
],
|
181
181
|
"unlocked_by": null,
|
182
|
-
"uuid": "
|
182
|
+
"uuid": "aa34b8a4-6958-42d4-b0ca-d846811afef1"
|
183
183
|
}
|
184
184
|
],
|
185
185
|
"foregone": [],
|
@@ -75,9 +75,8 @@ cases = [ Case { description = "single bit one to decimal"
|
|
75
75
|
, outputDigits = Just [6, 10, 45]
|
76
76
|
}
|
77
77
|
|
78
|
-
-- The following cases are
|
78
|
+
-- The following three cases are [0] in all-your-base.json.
|
79
79
|
-- Here we use [] to represent the lack of digits, i.e., zero.
|
80
|
-
|
81
80
|
, Case { description = "empty list"
|
82
81
|
, inputBase = 2
|
83
82
|
, inputDigits = []
|
@@ -96,6 +95,7 @@ cases = [ Case { description = "single bit one to decimal"
|
|
96
95
|
, outputBase = 2
|
97
96
|
, outputDigits = Just []
|
98
97
|
}
|
98
|
+
|
99
99
|
, Case { description = "leading zeros"
|
100
100
|
, inputBase = 7
|
101
101
|
, inputDigits = [0, 6, 0]
|
@@ -62,10 +62,10 @@ specs = do
|
|
62
62
|
runTexts ["2 4 * 3 /"] `shouldBe` Right [2]
|
63
63
|
|
64
64
|
describe "dup" $ do
|
65
|
+
it "copies a value on the stack" $
|
66
|
+
runTexts ["1 dup" ] `shouldBe` Right [1, 1]
|
65
67
|
it "copies the top value on the stack" $
|
66
|
-
runTexts ["1
|
67
|
-
it "is case-insensitive" $
|
68
|
-
runTexts ["1 2 Dup"] `shouldBe` Right [1, 2, 2]
|
68
|
+
runTexts ["1 2 dup"] `shouldBe` Right [1, 2, 2]
|
69
69
|
it "errors if there is nothing on the stack" $
|
70
70
|
runTexts ["dup" ] `shouldBe` Left StackUnderflow
|
71
71
|
|
@@ -124,3 +124,21 @@ specs = do
|
|
124
124
|
|
125
125
|
it "errors if executing a non-existent word" $
|
126
126
|
runTexts ["1 foo"] `shouldBe` Left (UnknownWord "foo")
|
127
|
+
|
128
|
+
describe "case-insensitivity" $ do
|
129
|
+
it "DUP is case-insensitive" $
|
130
|
+
runTexts ["1 DUP Dup dup" ] `shouldBe` Right [1, 1, 1, 1]
|
131
|
+
it "DROP is case-insensitive" $
|
132
|
+
runTexts ["1 2 3 4 DROP Drop drop"] `shouldBe` Right [1]
|
133
|
+
it "SWAP is case-insensitive" $
|
134
|
+
runTexts ["1 2 SWAP 3 Swap 4 swap"] `shouldBe` Right [2, 3, 4, 1]
|
135
|
+
it "OVER is case-insensitive" $
|
136
|
+
runTexts ["1 2 OVER Over over" ] `shouldBe` Right [1, 2, 1, 2, 1]
|
137
|
+
|
138
|
+
it "user-defined words are case-insensitive" $
|
139
|
+
runTexts [ ": foo dup ;"
|
140
|
+
, "1 FOO Foo foo" ] `shouldBe` Right [1, 1, 1, 1]
|
141
|
+
|
142
|
+
it "definitions are case-insensitive" $
|
143
|
+
runTexts [ ": SWAP DUP Dup dup ;"
|
144
|
+
, "1 swap" ] `shouldBe` Right [1, 1, 1, 1]
|
@@ -2,25 +2,29 @@
|
|
2
2
|
|
3
3
|
Calculate the date of meetups.
|
4
4
|
|
5
|
-
Typically meetups happen on the same day of the week. In this exercise, you
|
6
|
-
a description of a meetup date, and return the actual meetup date.
|
5
|
+
Typically meetups happen on the same day of the week. In this exercise, you
|
6
|
+
will take a description of a meetup date, and return the actual meetup date.
|
7
7
|
|
8
8
|
Examples of general descriptions are:
|
9
9
|
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
10
|
+
- The first Monday of January 2017
|
11
|
+
- The third Tuesday of January 2017
|
12
|
+
- The wednesteenth of January 2017
|
13
|
+
- The last Thursday of January 2017
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
The descriptors you are expected to parse are:
|
16
|
+
first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
|
17
|
+
thursteenth, friteenth, saturteenth, sunteenth
|
18
|
+
|
19
|
+
Note that "monteenth", "tuesteenth", etc are all made up words. There was a
|
20
|
+
meetup whose members realized that there are exactly 7 numbered days in a month
|
21
|
+
that end in '-teenth'. Therefore, one is guaranteed that each day of the week
|
18
22
|
(Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
|
19
23
|
in every month.
|
20
24
|
|
21
|
-
Given examples of a meetup dates, each containing a month, day, year, and
|
22
|
-
|
23
|
-
|
25
|
+
Given examples of a meetup dates, each containing a month, day, year, and
|
26
|
+
descriptor calculate the date of the actual meetup. For example, if given
|
27
|
+
"The first Monday of January 2017", the correct meetup date is 2017/1/2.
|
24
28
|
|
25
29
|
## Hints
|
26
30
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Sum Of Multiples
|
2
2
|
|
3
|
-
Given a number, find the sum of all the multiples of particular numbers up to
|
3
|
+
Given a number, find the sum of all the unique multiples of particular numbers up to
|
4
4
|
but not including that number.
|
5
5
|
|
6
|
-
If we list all the natural numbers
|
7
|
-
|
6
|
+
If we list all the natural numbers below 20 that are multiples of 3 or 5,
|
7
|
+
we get 3, 5, 6, 9, 10, 12, 15, and 18.
|
8
8
|
|
9
9
|
The sum of these multiples is 78.
|
10
10
|
|
@@ -12,11 +12,11 @@ A game consists of 10 frames. A frame is composed of one or two balls thrown, wi
|
|
12
12
|
|
13
13
|
* An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down after the second throw.
|
14
14
|
|
15
|
-
* A spare is where all
|
15
|
+
* A spare is where all 10 pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in the next throw.
|
16
16
|
|
17
|
-
* A strike is where all
|
17
|
+
* A strike is where all 10 pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in the next two throws. If a strike is immediately followed by another strike, then the first strike's value cannot be totalled until the next throw.
|
18
18
|
|
19
|
-
Here is a three
|
19
|
+
Here is a three-frame example:
|
20
20
|
|
21
21
|
| Frame 1 | Frame 2 | Frame 3 |
|
22
22
|
| :-------------: |:-------------:| :---------------------:|
|
@@ -30,11 +30,11 @@ Frame 3 is (9 + 0) = 9
|
|
30
30
|
|
31
31
|
This means the current running total is 48.
|
32
32
|
|
33
|
-
The
|
33
|
+
The 10th frame in the game is a special case. If the player throws a strike or a spare, then they get one extra throw called a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down.
|
34
34
|
|
35
|
-
For a
|
35
|
+
For a 10th frame of X1/ (strike and a spare), the total value is 20.
|
36
36
|
|
37
|
-
For a
|
37
|
+
For a 10th frame of XXX (three strikes), the total value is 30.
|
38
38
|
|
39
39
|
## Requirements
|
40
40
|
|
@@ -12,7 +12,7 @@ describe('Bowling', function () {
|
|
12
12
|
expect(new Bowling(rolls).score()).toEqual(90);
|
13
13
|
});
|
14
14
|
|
15
|
-
xit('a spare followed by zeros is worth
|
15
|
+
xit('a spare followed by zeros is worth 10 points', function () {
|
16
16
|
var rolls = [6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
17
17
|
expect(new Bowling(rolls).score()).toEqual(10);
|
18
18
|
});
|
@@ -22,7 +22,7 @@ describe('Bowling', function () {
|
|
22
22
|
expect(new Bowling(rolls).score()).toEqual(16);
|
23
23
|
});
|
24
24
|
|
25
|
-
xit('consecutive spares each get a one
|
25
|
+
xit('consecutive spares each get a one-roll bonus', function () {
|
26
26
|
var rolls = [5, 5, 3, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
27
27
|
expect(new Bowling(rolls).score()).toEqual(31);
|
28
28
|
});
|
@@ -32,7 +32,7 @@ describe('Bowling', function () {
|
|
32
32
|
expect(new Bowling(rolls).score()).toEqual(17);
|
33
33
|
});
|
34
34
|
|
35
|
-
xit('a strike earns
|
35
|
+
xit('a strike earns 10 points in a frame with a single roll', function () {
|
36
36
|
var rolls = [10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
37
37
|
expect(new Bowling(rolls).score()).toEqual(10);
|
38
38
|
});
|
@@ -52,17 +52,17 @@ describe('Bowling', function () {
|
|
52
52
|
expect(new Bowling(rolls).score()).toEqual(18);
|
53
53
|
});
|
54
54
|
|
55
|
-
xit('rolling a spare with the two
|
55
|
+
xit('rolling a spare with the two-roll bonus does not get a bonus roll', function () {
|
56
56
|
var rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 3];
|
57
57
|
expect(new Bowling(rolls).score()).toEqual(20);
|
58
58
|
});
|
59
59
|
|
60
|
-
xit('strikes with the two
|
60
|
+
xit('strikes with the two-roll bonus do not get bonus rolls', function () {
|
61
61
|
var rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10];
|
62
62
|
expect(new Bowling(rolls).score()).toEqual(30);
|
63
63
|
});
|
64
64
|
|
65
|
-
xit('a strike with the one
|
65
|
+
xit('a strike with the one-roll bonus after a spare in the last frame does not get a bonus', function () {
|
66
66
|
var rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 10];
|
67
67
|
expect(new Bowling(rolls).score()).toEqual(20);
|
68
68
|
});
|
@@ -74,25 +74,25 @@ describe('Bowling', function () {
|
|
74
74
|
});
|
75
75
|
|
76
76
|
describe('Check game rules.', function () {
|
77
|
-
xit('rolls
|
77
|
+
xit('rolls cannot score negative points', function () {
|
78
78
|
var rolls = [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
79
79
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
80
80
|
new Error('Pins must have a value from 0 to 10'));
|
81
81
|
});
|
82
82
|
|
83
|
-
xit('a roll
|
83
|
+
xit('a roll cannot score more than 10 points', function () {
|
84
84
|
var rolls = [11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
85
85
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
86
86
|
new Error('Pins must have a value from 0 to 10'));
|
87
87
|
});
|
88
88
|
|
89
|
-
xit('two rolls in a frame
|
89
|
+
xit('two rolls in a frame cannot score more than 10 points', function () {
|
90
90
|
var rolls = [5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
91
91
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
92
92
|
new Error('Pin count exceeds pins on the lane'));
|
93
93
|
});
|
94
94
|
|
95
|
-
xit('two bonus rolls after a strike in the last frame
|
95
|
+
xit('two bonus rolls after a strike in the last frame cannot score more than 10 points', function () {
|
96
96
|
var rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 6];
|
97
97
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
98
98
|
new Error('Pin count exceeds pins on the lane'));
|
@@ -103,25 +103,25 @@ describe('Bowling', function () {
|
|
103
103
|
expect(new Bowling(rolls).score()).toEqual(26);
|
104
104
|
});
|
105
105
|
|
106
|
-
xit('the second bonus
|
106
|
+
xit('the second bonus roll after a strike in the last frame cannot be a strike if the first one is not a strike', function () {
|
107
107
|
var rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6, 10];
|
108
108
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
109
109
|
new Error('Pin count exceeds pins on the lane'));
|
110
110
|
});
|
111
111
|
|
112
|
-
xit('an unstarted game
|
112
|
+
xit('an unstarted game cannot be scored', function () {
|
113
113
|
var rolls = [];
|
114
114
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
115
115
|
new Error('Score cannot be taken until the end of the game'));
|
116
116
|
});
|
117
117
|
|
118
|
-
xit('an incomplete game
|
118
|
+
xit('an incomplete game cannot be scored', function () {
|
119
119
|
var rolls = [0, 0];
|
120
120
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
121
121
|
new Error('Score cannot be taken until the end of the game'));
|
122
122
|
});
|
123
123
|
|
124
|
-
xit('a game with more than
|
124
|
+
xit('a game with more than 10 frames and no last frame spare or strike cannot be scored', function () {
|
125
125
|
var rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
126
126
|
expect(function () { new Bowling(rolls).score(); }).toThrow(
|
127
127
|
new Error('Should not be able to roll after game is over'));
|
@@ -15,7 +15,7 @@ So say you have a matrix like so:
|
|
15
15
|
It has a saddle point at (1, 0).
|
16
16
|
|
17
17
|
It's called a "saddle point" because it is greater than or equal to
|
18
|
-
every element in its row and
|
18
|
+
every element in its row and less than or equal to every element in
|
19
19
|
its column.
|
20
20
|
|
21
21
|
A matrix may have zero or more saddle points.
|
@@ -4,7 +4,7 @@ Given a number, find the sum of all the multiples of particular numbers up to
|
|
4
4
|
but not including that number.
|
5
5
|
|
6
6
|
If we list all the natural numbers up to but not including 20 that are
|
7
|
-
multiples of either 3 or 5, we get 3, 5, 6
|
7
|
+
multiples of either 3 or 5, we get 3, 5, 6, 9, 10, 12, 15, and 18.
|
8
8
|
|
9
9
|
The sum of these multiples is 78.
|
10
10
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
var TwoBucket = require('./two-bucket');
|
2
2
|
|
3
3
|
describe('TwoBucket', function () {
|
4
|
-
describe('Measure using bucket one of size 3 and bucket two of size 5
|
4
|
+
describe('Measure using bucket one of size 3 and bucket two of size 5', function () {
|
5
5
|
var bucketOne = 3;
|
6
6
|
var bucketTwo = 5;
|
7
7
|
var goal = 1;
|
@@ -23,7 +23,7 @@ describe('TwoBucket', function () {
|
|
23
23
|
});
|
24
24
|
});
|
25
25
|
|
26
|
-
describe('Measure using bucket one of size 7 and bucket two of size 11
|
26
|
+
describe('Measure using bucket one of size 7 and bucket two of size 11', function () {
|
27
27
|
var bucketOne = 7;
|
28
28
|
var bucketTwo = 11;
|
29
29
|
var goal = 2;
|
data/tracks/julia/config.json
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
]
|
75
75
|
},
|
76
76
|
{
|
77
|
-
"uuid": "
|
77
|
+
"uuid": "9814f832-8bd1-4a2b-9a1e-fc0e3e8541b5",
|
78
78
|
"slug": "run-length-encoding",
|
79
79
|
"core": false,
|
80
80
|
"unlocked_by": "nucleotide-count",
|
@@ -245,7 +245,7 @@
|
|
245
245
|
]
|
246
246
|
},
|
247
247
|
{
|
248
|
-
"uuid": "
|
248
|
+
"uuid": "d1d5a74a-d488-4e2e-bd63-b74730057c98",
|
249
249
|
"slug": "collatz-conjecture",
|
250
250
|
"core": false,
|
251
251
|
"unlocked_by": "difference-of-squares",
|
@@ -296,7 +296,7 @@
|
|
296
296
|
]
|
297
297
|
},
|
298
298
|
{
|
299
|
-
"uuid": "
|
299
|
+
"uuid": "f7a3f344-a9fa-4a36-ac44-12bc8673899e",
|
300
300
|
"slug": "phone-number",
|
301
301
|
"core": false,
|
302
302
|
"unlocked_by": null,
|
@@ -309,7 +309,7 @@
|
|
309
309
|
]
|
310
310
|
},
|
311
311
|
{
|
312
|
-
"uuid": "
|
312
|
+
"uuid": "f5be4623-2a9a-4bf5-bb32-dd81eddf0683",
|
313
313
|
"slug": "triangle",
|
314
314
|
"core": false,
|
315
315
|
"unlocked_by": null,
|
@@ -356,7 +356,7 @@
|
|
356
356
|
]
|
357
357
|
},
|
358
358
|
{
|
359
|
-
"uuid": "
|
359
|
+
"uuid": "e4b19962-ebc1-4f12-9ac8-45f17faeaa55",
|
360
360
|
"slug": "robot-simulator",
|
361
361
|
"core": false,
|
362
362
|
"unlocked_by": "robot-name",
|
@@ -396,7 +396,7 @@
|
|
396
396
|
]
|
397
397
|
},
|
398
398
|
{
|
399
|
-
"uuid": "
|
399
|
+
"uuid": "4cc2a5d6-e662-4d99-81d4-05d6bcd500f4",
|
400
400
|
"slug": "grains",
|
401
401
|
"core": false,
|
402
402
|
"unlocked_by": "difference-of-squares",
|