Prefer snake-shift instead of a row-by-row shift
Per the assignment's instructions, the `Shift n` operation should treat
the *entire keyboard* like a cycle and shift that. I was erroneously
treating *each row* like a cycle and shifting those one-by-one.
This change fixes that. In addition, it also:
- Updates README.md with expected inputs and outputs
- Updates test suite
- Adds `split` dependency to {default,shell}.nix
This commit is contained in:
parent
f11b91c985
commit
bba3f16c43
5 changed files with 57 additions and 37 deletions
|
|
@ -57,11 +57,11 @@ Now a working example:
|
|||
$ ./result/transform-keyboard --transforms=HHVS12VHVHS3 --passage='Hello,Brilliant.'
|
||||
Typing: "Hello,Brilliant."
|
||||
On this keyboard:
|
||||
[N][M][,][.][/][Z][X][C][V][B]
|
||||
[H][J][K][L][;][A][S][D][F][G]
|
||||
[Y][U][I][O][P][Q][W][E][R][T]
|
||||
[6][7][8][9][0][1][2][3][4][5]
|
||||
Result: QKRRF30LDRRDY1;4
|
||||
[H][J][K][L][;][Q][W][E][R][T]
|
||||
[Y][U][I][O][P][1][2][3][4][5]
|
||||
[6][7][8][9][0][Z][X][C][V][B]
|
||||
[N][M][,][.][/][A][S][D][F][G]
|
||||
Result: ZIVV4D/O3VV36APF
|
||||
```
|
||||
|
||||
...and an example with an erroneous input (i.e. `!`):
|
||||
|
|
@ -70,10 +70,10 @@ Result: QKRRF30LDRRDY1;4
|
|||
$ ./result/transform-keyboard --transforms=HHVS12VHVHS3 --passage='Hello,Brilliant!'
|
||||
Typing: "Hello,Brilliant!"
|
||||
On this keyboard:
|
||||
[N][M][,][.][/][Z][X][C][V][B]
|
||||
[H][J][K][L][;][A][S][D][F][G]
|
||||
[Y][U][I][O][P][Q][W][E][R][T]
|
||||
[6][7][8][9][0][1][2][3][4][5]
|
||||
[H][J][K][L][;][Q][W][E][R][T]
|
||||
[Y][U][I][O][P][1][2][3][4][5]
|
||||
[6][7][8][9][0][Z][X][C][V][B]
|
||||
[N][M][,][.][/][A][S][D][F][G]
|
||||
Looks like at least one of the characters in your input passage doesn't fit on our QWERTY keyboard:
|
||||
[1][2][3][4][5][6][7][8][9][0]
|
||||
[Q][W][E][R][T][Y][U][I][O][P]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue