text2048 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/text2048/app.rb +3 -1
- data/lib/text2048/curses_view.rb +1 -2
- data/lib/text2048/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fc4e589611c32d106eb6742a8f7bb50a2379da3
|
4
|
+
data.tar.gz: f7d793dbc9519ae99535a002f4f37451424da2af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba4128143b9217432b92b41141267207b6ffe2325cffac012e70332e5f2ec94e377b06df368b51c7637a3020e9d670d93f921e0420f0020833a11313bd9a5755
|
7
|
+
data.tar.gz: 8af25359ad15268af987d56ef95c47dd258f95513a33630f9ecbafe7adcf9997abe845dceee4d8a409d497fd2c567d42a8875ce8f6ffbccc38d51e6ef01eb3f8
|
data/lib/text2048/app.rb
CHANGED
@@ -29,7 +29,6 @@ module Text2048
|
|
29
29
|
@view.game_over if @board.lose?
|
30
30
|
input KEYS[Curses.getch]
|
31
31
|
end
|
32
|
-
sleep
|
33
32
|
end
|
34
33
|
|
35
34
|
private
|
@@ -53,12 +52,15 @@ module Text2048
|
|
53
52
|
def move(command)
|
54
53
|
last = @board.dup
|
55
54
|
@board = @board.__send__(command)
|
55
|
+
@view.update(@board)
|
56
|
+
@view.pop_tiles(@board.merged_tiles)
|
56
57
|
last
|
57
58
|
end
|
58
59
|
|
59
60
|
def generate
|
60
61
|
@board.generate
|
61
62
|
@view.update(@board)
|
63
|
+
@view.zoom_tiles(@board.generated_tiles)
|
62
64
|
end
|
63
65
|
end
|
64
66
|
end
|
data/lib/text2048/curses_view.rb
CHANGED
data/lib/text2048/version.rb
CHANGED