mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 14:13:48 +01:00
Update codingcontracttypes.ts
prettier
This commit is contained in:
parent
699d792e5b
commit
51ba358464
@ -1833,11 +1833,11 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
||||
// data = [plaintext, keyword]
|
||||
// build char array, shifting via map and corresponding keyword letter and join to final results
|
||||
const cipher = [...data[0]]
|
||||
.map((a, i) =>
|
||||
(a === " "
|
||||
.map((a, i) => {
|
||||
return a === " "
|
||||
? a
|
||||
: String.fromCharCode(((a.charCodeAt(0) - 2 * 65 + data[1].charCodeAt(i % data[1].length)) % 26) + 65)),
|
||||
)
|
||||
: String.fromCharCode(((a.charCodeAt(0) - 2 * 65 + data[1].charCodeAt(i % data[1].length)) % 26) + 65);
|
||||
})
|
||||
.join("");
|
||||
return cipher === ans;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user