Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
" Cipher Map" solution in Clear category for [old] Cipher Map by capback250
"use strict";
const rotate90 = matrix => matrix.map((_, i) => matrix.map(e=> e[i]).reverse());
function recallPassword(grille, password){
const compare = mask => mask.map((_, i) => mask.map((_, j) => grille[i][j] === 'X' ? password[i][j] : false )
.filter(e=>e))
.reduce((a, b) => a.concat(b), []);
return password.map(_ =>{
let c = compare(grille);
grille = rotate90(grille);
return c.join('')
}).join('')
}
May 16, 2017
Comments: