summaryrefslogtreecommitdiff
path: root/README
blob: ee07278b7abbf02ba0de1a8b7c9698cc30eb0eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
================================ SIRTET ================================

SIRTET is a game. Conceptually it is like Tetris, except:
- Pieces do not fall from the top; you manually place them
- You have multiple pieces to choose from
- Pieces cannot be rotated
- Map size is arbitrary
- There is no time limit
- More shapes are available
- Rows *and* columns are cleared when full

--------------------------------- RULES --------------------------------

By default, you are given an 8x8 blank map and 3 pieces with randomly
chosen shapes. You have to place each of the pieces, in whichever order,
onto the map. Once it is placed, it occupies several blocks, which
cannot overlap with blocks that are already taken. For every piece you
successfully place, you are awarded a number of points equal to that of
newly occupied blocks.

If a row and column becomes full, i.e. all occupied, it is cleared. You
are awarded a number of points equal to that of blocks cleared, and you
can place pieces on the row or column again.

Once you deplete your pieces, you are given 3 more. If at any point you
find it impossible to place any, the game is over.

------------------------------- BUILDING -------------------------------

To build SIRTET, you need gcc (or any other compatible C compiler, I can't
stop you) and ncurses. All you need to do is:

$ gcc *.c -lncurses -o sirtet

Or equivalent thereof, with your compiler of choice. For the lazy (such
as myself), I wrote a Makefile that compiles and runs SIRTET in one run:

$ make

(Note: this compiles SIRTET with debug symbols.)

------------------------------- RUNNING --------------------------------

For the default, just run

$ ./sirtet

This will bring you to a ncurses UI. Consult section "KEYS" for how to
play.

To override the default map size and number of pieces, here are three
optional arguments:

$ ./sirtet -h [height] -w [width] -p [pieces]

The minimum value is 5 for height and width, and 1 for piece. Default
values are 8, 8, and 3.

---------------------------------- UI ----------------------------------

Once you enter the game, you will be presented a map and several pieces
below it. There will always be a "hovering" piece that is to be placed.
You can switch it using [ or ] keys. You can also move it using arrow
keys, wasd, or vi-style hjkl keybindings. If it is red, it means you may
not place the piece here as it overlaps with occupied blocks. If it is
green, you may press Enter to place it. As a piece is placed, the map
updates, and the next piece appears in the top left corner.

At any point, you may press q to quit the game. There will be no
confirmation.