42 lines
706 B
Plaintext
42 lines
706 B
Plaintext
function CanMakeWord word
|
|
|
|
put [
|
|
("B", "O"),
|
|
("X", "K"),
|
|
("D", "Q"),
|
|
("C", "P"),
|
|
("N", "A"),
|
|
("G", "T"),
|
|
("R", "E"),
|
|
("T", "G"),
|
|
("Q", "D"),
|
|
("F", "S"),
|
|
("J", "W"),
|
|
("H", "U"),
|
|
("V", "I"),
|
|
("A", "N"),
|
|
("O", "B"),
|
|
("E", "R"),
|
|
("F", "S"),
|
|
("L", "Y"),
|
|
("P", "C"),
|
|
("Z", "M")
|
|
] into blocks
|
|
|
|
repeat with each character letter of word
|
|
put False into found
|
|
repeat with each item block of blocks by reference
|
|
if item 1 of block is letter ignoring case or item 2 of block is letter ignoring case
|
|
delete block
|
|
put True into found
|
|
exit repeat
|
|
end if
|
|
end repeat
|
|
if found is False
|
|
return False
|
|
end if
|
|
end repeat
|
|
return True
|
|
|
|
end CanMakeWord
|