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]
|
// data = [plaintext, keyword]
|
||||||
// build char array, shifting via map and corresponding keyword letter and join to final results
|
// build char array, shifting via map and corresponding keyword letter and join to final results
|
||||||
const cipher = [...data[0]]
|
const cipher = [...data[0]]
|
||||||
.map((a, i) =>
|
.map((a, i) => {
|
||||||
(a === " "
|
return a === " "
|
||||||
? 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("");
|
.join("");
|
||||||
return cipher === ans;
|
return cipher === ans;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user