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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0e75242c094ba3e75243ce53f9c089c09da2e24
4
- data.tar.gz: a0410d80241c4e0067873cc4fe1bfe9fe9acdb09
3
+ metadata.gz: 2fc4e589611c32d106eb6742a8f7bb50a2379da3
4
+ data.tar.gz: f7d793dbc9519ae99535a002f4f37451424da2af
5
5
  SHA512:
6
- metadata.gz: a1e94bc8de48cb973501983cf4c131b091362589c4c2eca09052a689111660e58557b6b344dea329641fb40b03b55477817e8191df01a28a2425bf1e7d396a4e
7
- data.tar.gz: 421b6c1f62274af76bfa224c1605c4f31f81bb337586251fd667c43c2ec0a932c0f1fefc28ab6bfa969f7abac98919f43dbcb4fd0506e74488a4e811e9c3a95c
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
@@ -69,8 +69,7 @@ module Text2048
69
69
  draw_score(board.score)
70
70
  draw_tiles(board.tiles)
71
71
  refresh
72
- pop_tiles(board.merged_tiles)
73
- zoom_tiles(board.generated_tiles)
72
+ # zoom_tiles(board.generated_tiles)
74
73
  end
75
74
 
76
75
  def height
@@ -3,5 +3,5 @@
3
3
  # This module smells of :reek:UncommunicativeModuleName
4
4
  module Text2048
5
5
  # gem version.
6
- VERSION = '0.2.0'.freeze
6
+ VERSION = '0.3.0'.freeze
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text2048
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhito Takamiya