Commit Graph

126 Commits

Author SHA1 Message Date
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
Undeemiss
b7f78b11dd BREAKING: Capitalized the E in the hamming code encoding contract 2022-04-21 21:38:04 -05:00
Undeemiss
dabf7098db
Reworded "plotting functions" as simply "plotting" 2022-04-21 10:40:21 -05:00
Undeemiss
399f8614e8 Formatted and linted; I forgot to last commit 2022-04-21 10:35:14 -05:00
Undeemiss
f482e0c4a9 Updated description of 2-coloring contract
Fixed a couple of incorrect statements in the 2-coloring contract
description, as well as rephrasing some things for clarity.
2022-04-21 10:32:57 -05:00
Undeemiss
6685e8dc46 Added a description for the 2-coloring contract 2022-04-20 22:06:32 -05:00
Undeemiss
8d026e4f10 Randomized the order of the edges as well as the vertices
Previously, edge order would stay constant while vertex order was
shuffled. This way, there is even less opportunity for a player to
reverse-engineer the initial bipartite graph.
2022-04-20 21:23:55 -05:00
Undeemiss
951221578a Implemented no solution case of 2-coloring contract checker
Implemented a greedy 2-coloring algorithm to check whether a given
graph is 2-colorable. The algorithm is only used if the player
provides "[]" as their answer; other answers will be checked using
the previously implemented validation code.
2022-04-20 20:54:07 -05:00
Undeemiss
bdfd102085 Partially implemented solver for 2-coloring contract
Implemented the case for the 2-coloring solver to validate that
entered colorings are proper. Still needs a case for when no
solution exists.
Also, changed the data from type [number, number][] to
[number, [number, number][]], so that the number of vertices in
the graph can be the first parameter.
2022-04-20 17:01:35 -05:00
Undeemiss
a97f864e14 Implemented generator for 2-coloring contract
Implemented the generator for a new contract type. For now, has
a description and solution checker designed only for testing. The
generator creates a bipartite graph with random edges, then
attempts to add one additional edge without regard for the partite
sets. It then randomizes the vertices of the graph to make reverse-
engineering the original partite sets impossible.

The shuffling algorithm is adapted from stack overflow code, but
really, what isn't?
2022-04-20 00:24:18 -05:00
hydroflame
f43c3831be
Merge pull request #3504 from danielyxie/dev
Fix script editor settings.
2022-04-18 12:53:15 -04:00
hydroflame
b49b5ba269
Revert "MISC: HammingCodingContracts need rework" 2022-04-18 12:01:10 -04:00
hydroflame
d37e6df779
Merge pull request #3495 from danielyxie/dev
blood
2022-04-18 11:19:55 -04:00
H3draut3r
2d0cccfa3f HammingCodingContracts need rework 2022-04-16 18:30:38 +02:00
ActuallyCurtis
4b3694d806
Typo fixes to Encoded Binary to Integer
Various capitalization and punctuation fixes
Changed "Note" to "NOTE" to match other coding contracts. 
Removed "encoded/decoded following hamming's rule" because I couldn't find references to hamming's rule (there are various things called Hamming's Rule, but they didn't seem relevant here). I believe that clause was just emphasizing that the binary string encoded as a hamming code, which we already know?
Rewrote the "return" text to include it should be a string. 
*NOTE 4 could be removed, or kept for redundancy's sake
*"So MAYBE there is an altered bit" is also redundant, since note 3 already says a 55% chance, which means "maybe." Left, but could be removed.
2022-04-15 00:34:50 -07:00
Olivier Gagnon
8dab9f7871 fmt 2022-04-14 02:35:30 -04:00
hydroflame
93eb5e2d78
Merge pull request #3247 from Savlik/dev
Accept valid JSON arrays in coding contracts
2022-04-13 16:29:26 -04:00
Risenafis
e27994367d fix HammingCodes description 2022-04-13 01:13:21 +09:00