catloversg
36c143b687
CODEBASE: Fix lint errors 2 ( #1756 )
2024-11-06 23:09:11 -08:00
Ben Rog-Wilhelm
dad34a09dd
CONTRACT: Fix incorrect description of Hamming Codes in Integer to Encoded Binary. ( #1677 )
2024-10-04 03:51:31 -07:00
David Walker
bedd398789
CCT: Add new Square Root coding contract ( #1656 )
...
To make this simpler, there is now a general-purpose util for getting
random bigints. I don't know if anyone else will use it, but it makes
this code simpler.
I also rejiggered the type-checking on contracts a little more, because
the previous refactor didn't quite catch all the mistakes that could be
made.
2024-09-30 20:18:58 -07:00
David Walker
21ffa5322f
MISC: Refactor coding contracts for type safety ( #1653 )
...
* MISC: Refactor coding contracts for type safety
This refactor does three things without any behavior changes:
* Adds type safety by introducing generic type parameters to the coding
contract definitions, so they can use concrete types instead of
"unknown". This also eliminates a bunch of boilerplate casts.
* Removes the unneeded CodingContractType class. We can use the metadata
type directly.
* Introduces a new hidden state to coding contracts. Instead of
generating and storing the data (which is what is shown to the user as
the problem's input), the state is stored instead. This allows
problems to (for instance) generate the answer up-front, and check the
solution directly against the answer, instead of needing to embed a
solver in the problem (which can then easily be ripped from the source
code).
For compatibility, state == data by default. I plan to make use of this
feature in a followup, but it is unused currently.
2024-09-15 23:53:10 -07:00
gmcew
2d1747b3e9
CONTRACTS: Hamming Code parity sentence clarification, "Find All Valid Math Expressions" missing line breaks added, example formatting made consistent ( #1550 )
2024-08-06 15:02:54 -07:00
jazzybones-www
1613eb38ed
BUGFIX: fix a typo in the hamming code problem statement ( #1472 )
2024-07-07 14:41:22 -07:00
John Gietzen
819f877370
Update codingcontracttypes.ts to clarify '0' ( #1433 )
...
Fixes #1432
2024-06-24 22:02:11 -07:00
catloversg
4382f860db
CCT: Clarify empty string solution in UI ( #1400 )
2024-06-15 16:37:14 -07:00
gmcew
c82b2e15a0
MISC: Additional clarity in 'HammingCodes: Encoded Binary to Integer' ( #1289 )
...
Should have done this in PR #1244
2024-05-23 00:45:25 -07:00
gmcew
fe14d4fef3
CCT: Minor simplification of 'Shortest Path' solver ( #1288 )
...
BFS shouldn't need some checks.
Also allows deletion of a helper file used by this function only.
2024-05-23 00:44:41 -07:00
Yichi Zhang
7ed64cbc9c
Improve performance of checker for valid math contracts ( #1286 )
2024-05-23 00:41:52 -07:00
catloversg
175af0bd28
BUGFIX: Improve implementation of getRandomInt ( #1282 )
2024-05-18 15:12:06 -07:00
gmcew
519b4fef44
MISC: Hamming Code Contract description clarification ( #1244 )
...
Rewording of the Hamming code contract wording based on suggestion at discord.
There's further scope on other contracts to clean up inconsistencies in example formatting.
2024-05-11 17:00:36 -07:00
LJ
011d5e8fd6
BUGFIX: Properly deep copy array data for coding contracts ( #1064 )
2024-01-31 19:43:04 -05:00
Collin Pearce
0da9d9d3c0
fix player input parsing for coding contracts that accept arrays of strings ( #937 )
2024-01-02 09:26:34 -05:00
myCatsName
647b78c9f7
CCT: accept IP solutions with matched single or double quotes, or none ( #712 )
2023-08-06 09:13:01 -04:00
omuretsu
ae8f26f03b
More hotfix
...
* Fix empty solution for all valid math expressions
2023-05-28 05:25:44 -04:00
Snarling
ebae35b1fb
CODEBASE: Expand lint rules, and Aliases are stored as maps ( #501 )
2023-05-05 03:55:59 -04:00
omuretsu
f16246f939
Fix Math Expressions contract
...
Previously player could submit as many wrong answers in the solution as they wanted, as long as all correct answers were included. Fixed by ensuring length matches actual answer.
2023-02-28 09:14:12 -05:00
quacksouls
f50b731846
Fix doc typo for "Sanitize Parentheses in Expression" contract ( #389 )
2023-02-24 22:31:10 -05:00
quacksouls
634611f9db
DOC: Improve CCT documentation for HammingCodes ( #167 )
2022-10-30 04:24:09 -04:00
quacksouls
e9e9ac1def
DOC: CCT: typo fixes ( #145 )
...
Fixes #144 . Some typographical fixes in the description of a Coding Contract.
2022-10-24 08:46:26 -04:00
Olivier Gagnon
f6f023eeb4
Fix tons of typos
2022-10-09 01:25:31 -04:00
Snarling
a1f90d77ce
Prettier fix
2022-09-27 19:58:14 -04:00
Snarling
73e314aa31
Add quotation marks to expected answer
...
Matches the way an array of strings is denoted in js
2022-09-27 19:52:25 -04:00
Snarling
aba6de1514
Allow IPs to have quotes around them
2022-09-27 19:41:00 -04:00
Snarling
b700b0246b
Fix contract input handling
2022-08-02 11:11:49 -04:00
Olivier Gagnon
e55a3f39d4
allbuild commit 6498a720
2022-07-21 02:54:12 -04:00
hydroflame
74a8ce1a76
Merge pull request #3759 from Markus-D-M/contracts_encryption
...
MISC Two new encryption themed contracts - caesar and vigenere
2022-07-21 02:33:52 -04:00
hydroflame
a48ae726ba
Merge pull request #3778 from s2ks/hamming
...
CODINGCONTRACT: HammingCodes description and implementation fixes
2022-07-21 02:16:35 -04:00
Olivier Gagnon
c977a9def7
tidy up eslint.js
2022-07-19 12:19:32 -04:00
Olivier Gagnon
86c0913bd3
rm some any
2022-07-14 23:03:54 -04:00
s2ks
b27e7d00fe
format
2022-07-08 01:37:42 +02:00
s2ks
063da8aa60
fetch latest from upstream
2022-07-08 01:35:20 +02:00
hydroflame
4f617e7d3d
Merge pull request #3818 from ApamNapat/fixed_some_typos_and_style_issues
...
MISC: Fixed some typos and style issues
2022-07-06 14:35:31 -04:00
BB
de01ae20b9
Fixed some typos and style issues
2022-06-07 15:26:33 +02:00
s2ks
c88d3bcf85
format
2022-05-27 22:37:32 +02:00
s2ks
bcc53c48a7
be clear about the form the answer should come in
2022-05-27 22:31:42 +02:00
s2ks
4b37603ea5
Attempt to clear up some ambiguity in the descriptions
...
of the "HammingCodes" coding contracts as well as having the
"HammingCodes: Encoded Binary to Integer" coding contract generate valid
Hamming codes.
2022-05-27 21:36:03 +02:00
Markus-D-M
30687ce74e
Typo
2022-05-26 21:08:28 +02:00
Markus-D-M
1d06273858
Specify api data + Adding description to doc.
2022-05-26 09:40:05 +02:00
Markus-D-M
51ba358464
Update codingcontracttypes.ts
...
prettier
2022-05-25 21:41:58 +02:00
Markus-D-M
699d792e5b
Update codingcontracttypes.ts
...
two encryption contracts
2022-05-25 21:41:58 +02:00
hydroflame
41b9a858de
Merge pull request #3678 from danielyxie/dev
...
v1.7.0
2022-05-20 15:21:21 -04:00
Undeemiss
a1754da9f6
Random comment added to my coding contract so I can PR this branch
2022-05-09 15:04:09 -05:00
Staszek Welsh
55d9810727
Handle edge case in LZ compression code and fix docs
2022-04-28 19:50:17 +01:00
hydroflame
44475aaac9
Merge branch 'dev' into breaking-contract-capitalization
2022-04-26 11:15:37 -04:00
hydroflame
686f458064
Merge pull request #3561 from danielyxie/dev
...
Keeping up to date.
2022-04-25 13:52:20 -04:00
Olivier Gagnon
bab57fb4de
make gang button a component
2022-04-25 12:02:37 -04:00
Staszek Welsh
174d17a5e2
Add compression coding contracts
...
Add three new contracts:
* Compression I: RLE Encoding
* Compression II: LZ Decoding
* Compression III: LZ Encoding
as well as associated utility functions
2022-04-22 17:31:52 +01:00