Select Git revision
snake.js 962 B
/* IMPORTANT: Remove these directives when you start working on the code so that
* the linter will warn you about code style issues. */
/* eslint-disable no-unused-vars, no-useless-constructor */
import { Incidence, dijkstras } from './dijkstras.js';
import { VOCABULARY } from './vocabulary.js';
class Vertex {
constructor(/* Add constructor parameters per the assignment instructions. */) {
// Implement this constructor per the assignment instructions.
}
toKey() {
return ''; // Implement this method per the assignment instructions.
}
}
export function buildWordSnake(beginningLetter, targetRow, targetColumn) {
function*getIncidences(vertex) {
// Implement this generator function per the assignment instructions.
}
return dijkstras(
new Vertex(/* Add constructor arguments per the assignment instructions. */),
getIncidences,
(vertex) => true, // Implement this predicate per the assignment instructions.
);
}