Skip to content

Commit 8a0c654

Browse files
committed
updated README
1 parent 299683c commit 8a0c654

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
http://github.com/bart9h/2n
77

88

9+
## Installation
10+
11+
Just run `make` to compile.
12+
There are no dependencies beyond GNU make and gcc.
13+
14+
915
## How to play
1016

1117
Use `w`, `a`, `s`, `d` or vi arrow keys (`h`, `j`, `k`, `l`) to play.
1218

13-
`m` to cycle through draw modes.
19+
`m` to cycle through draw modes (fancy, compact and ultra-compact).
1420

1521
`n` resets the board (new game).
1622

@@ -20,4 +26,16 @@ Game is automatically saved/loaded in `~/.2nrc`
2026

2127
Set environment variable `SIZE` to change the board size
2228
(effective on next board init), must be between 3 and 16.
29+
2330
Example: `SIZE=8 ./2n`
31+
32+
33+
## Navigating the source code:
34+
35+
* 2n.c: main() and drawing
36+
37+
* game.c, game.h: game logic
38+
39+
* itr.c, itr.h: cell iterator
40+
41+
* rawkb.c, rawkb.h: get input from the keyboard

rawkb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ bool RawKb_Open (rawkb_mode_t mode)
1616
{
1717
rawkb_data.mode = mode;
1818

19-
// le estado atual
19+
// read current state
2020
if(tcgetattr(STDIN_FILENO, &rawkb_data.tc_original) == -1) {
2121
perror("tcgetattr");
2222
return false;
2323
}
2424

2525
struct termios tc;
26-
27-
// altera pra ler sem echo e nao esperar enter
2826
tc = rawkb_data.tc_original;
2927

3028
// don't wait for <enter>

0 commit comments

Comments
 (0)