Skip to content

Commit 0b429bc

Browse files
committed
cleanup
1 parent ace8161 commit 0b429bc

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

ci/expect_scripts/terminal-app-snake.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ expect "Score: 0\r\n" {
1818
expect -re {Score:.*}
1919
}
2020

21-
# This press should collide with the bottom wall and lead to game over
21+
# This press should make the snake collide with the bottom wall and lead to game over
2222
send "s"
2323

2424
expect -re {.*Game Over.*} {

examples/terminal-app-snake.roc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GameState : {
2020
}
2121

2222
# The snake list should never be empty, so we use a non-empty list.
23-
# Typically we'd use head and tail, but this would be confusing with the snake head and tail later on :)
23+
# Typically we'd use head and tail, but this would be confusing with the snake's head and tail later on :)
2424
NonEmptyList : { first : Position, rest : List Position }
2525

2626
initial_state = {

platform/Tty.roc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Provides functionality to liberate the terminal from its default behaviour.
2-
## This is useful for making a terminal app like vim or a game.
1+
## Provides functionality to change the behaviour of the terminal.
2+
## This is useful for running an app like vim or a game in the terminal.
33
##
44
## Note: we plan on moving this file away from basic-cli in the future, see github.com/roc-lang/basic-cli/issues/73
55
##
@@ -12,11 +12,10 @@ import Host
1212

1313
## Enable terminal [raw mode](https://en.wikipedia.org/wiki/Terminal_mode) to disable some default terminal bevahiour.
1414
##
15-
## The following modes are disabled:
16-
## - Input will not be echoed to the terminal screen
17-
## - Input will not be buffered until Enter key is pressed
18-
## - Input will not be line buffered (input sent byte-by-byte to input buffer)
19-
## - Special keys like Backspace and CTRL+C will not be processed by terminal driver
15+
## This leads to the following changes:
16+
## - Input will not be echoed to the terminal screen.
17+
## - Input will be sent straight to the program instead of being buffered (= collected) until the Enter key is pressed.
18+
## - Special keys like Backspace and CTRL+C will not be processed by the terminal driver but will be passed to the program.
2019
##
2120
## Note: we plan on moving this function away from basic-cli in the future, see github.com/roc-lang/basic-cli/issues/73
2221
##

0 commit comments

Comments
 (0)