starx 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/starx +12 -0
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b2343a38acde7681f1c5eedc31111515a2274a5
4
- data.tar.gz: 887129f3992db20f11c5e6158e61ff4a56bc8436
3
+ metadata.gz: a1766004e6d683bafb2bd91cda59db189d97a615
4
+ data.tar.gz: 090ce82321ae8f293d5b22b30c21aee653a2d6bc
5
5
  SHA512:
6
- metadata.gz: e0db518483b50e22c0d74a16ef3ab7b1593a38ca6d273f7f25cdfb027a9b98cc299d99fe9380b480b9d28f21d37c2e087bf8f379805fb57da25fd6f083fabb9e
7
- data.tar.gz: 22556d3ba2615f581f465eadf9ffba404af027222a09431b8788ab4b88b58ffc56311550d217044739674a79e1be7588acc1cb6e81466cb5746543c16406da04
6
+ metadata.gz: 4045128452861c9d176bdecb100934cebb599ce4999fe2af3265bfd4630b1b4ef831077a71a253a353e8ede19b6e97e9a24b97ac43567552966f7c4483a60b7f
7
+ data.tar.gz: 869a6a660d3087085ead46be40f4bf818ddce4f4780409391dda8ab674d272715db8b0a50c7717feb4bdee09e88cb3c125d6ae43ff0d92b9ff0178b0fd9f7b6d
data/bin/starx CHANGED
@@ -137,6 +137,14 @@ class Starx
137
137
  switch_player_with(-1,0)
138
138
  end
139
139
 
140
+ def move_forward!
141
+ switch_player_with(0,-1)
142
+ end
143
+
144
+ def move_backward!
145
+ switch_player_with(0,1)
146
+ end
147
+
140
148
  def switch_player_with(y,x)
141
149
  player_x = find_player[1].to_i
142
150
  player_y = find_player[0].to_i
@@ -186,6 +194,10 @@ class Starx
186
194
  move_up!
187
195
  when "\e[B"
188
196
  move_down!
197
+ when "\e[C"
198
+ move_forward!
199
+ when "\e[D"
200
+ move_backward!
189
201
  end
190
202
  end
191
203
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justyna Rachowicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-03 00:00:00.000000000 Z
11
+ date: 2015-03-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: justynarachowicz@gmail.com
@@ -28,12 +28,12 @@ require_paths:
28
28
  - lib
29
29
  required_ruby_version: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  required_rubygems_version: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - '>='
36
+ - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []