starx 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/starx +12 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1766004e6d683bafb2bd91cda59db189d97a615
|
4
|
+
data.tar.gz: 090ce82321ae8f293d5b22b30c21aee653a2d6bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
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: []
|