mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +01:00
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.
This commit is contained in:
parent
45ca94b1dc
commit
f16246f939
@ -1271,6 +1271,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
||||
|
||||
const result: string[] = [];
|
||||
helper(result, "", num, target, 0, 0, 0);
|
||||
// Prevent player from providing extra wrong answers and still receiving credit
|
||||
if (result.length !== sanitizedPlayerAnsArr.length) return false;
|
||||
|
||||
for (const expr of result) {
|
||||
if (!sanitizedPlayerAnsArr.includes(expr)) {
|
||||
|
Loading…
Reference in New Issue
Block a user