vg_tools 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/helper_tools/place_blocks.rb +4 -4
- data/lib/vg_tools/version.rb +1 -1
- data/lib/vg_tools.rb +3 -3
- 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: c1f6a1f644d84d3998a11324f6d6ce653271be44
|
4
|
+
data.tar.gz: 9790f034f08522b762ad34f824c02feaaf007a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a47d42820f10c7d568ad733209bfff2bb8a6ccf12992dcbff7edd46c199ff5349dc3ae00f7ca4da59a1a05443d9568971e4f75f6728fd33e888e45cc679fee68
|
7
|
+
data.tar.gz: 4b71abf3eb5ef7a199f828a2c59df34c093f96c6a21031b78f17e2e4ddcaa6defa900312704e9971208a3ecd2cb8fb1f5fcfc50051fb958a4b92e03988a04d2f
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module PlaceBlocks
|
2
2
|
|
3
|
-
def add_block(row,col,want_print=true,options={color: :
|
3
|
+
def add_block(row,col,want_print=true,options={color: :teal})
|
4
4
|
block_placement("▒ ",row,col,want_print,options)
|
5
5
|
end
|
6
6
|
|
7
|
-
def remove_block(row,col,want_print=true,options={color: :
|
7
|
+
def remove_block(row,col,want_print=true,options={color: :teal})
|
8
8
|
block_placement("¤ ",row,col,want_print,options)
|
9
9
|
end
|
10
10
|
|
@@ -77,10 +77,10 @@ private
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def many_blocks_placement(character, block_array, want_print)
|
80
|
-
block_array.each { |block| block_placement("▒ ",block[0],block[1],false,{color: :
|
80
|
+
block_array.each { |block| block_placement("▒ ",block[0],block[1],false,{color: :teal})}
|
81
81
|
if want_print
|
82
82
|
show_map = dup_map
|
83
|
-
block_array.each { |block| block_placement("▒ ",block[0],block[1], false, alt_map: show_map, color: :
|
83
|
+
block_array.each { |block| block_placement("▒ ",block[0],block[1], false, alt_map: show_map, color: :teal)}
|
84
84
|
print_map(show_map)
|
85
85
|
end
|
86
86
|
end
|
data/lib/vg_tools/version.rb
CHANGED
data/lib/vg_tools.rb
CHANGED
@@ -5,7 +5,7 @@ require 'helper_tools/place_blocks'
|
|
5
5
|
require 'helper_tools/checking_methods'
|
6
6
|
|
7
7
|
class String
|
8
|
-
{red: 31, green: 32, yellow: 33,
|
8
|
+
{red: 31, green: 32, yellow: 33, blue: 34, purple: 35, teal: 36, white: 37, black: 30}.each { |color, key| define_method("#{color}") { "\e[#{key}m#{self}\e[0m" }}
|
9
9
|
end
|
10
10
|
|
11
11
|
|
@@ -26,8 +26,8 @@ class Maze
|
|
26
26
|
def initialize(options_hash={})
|
27
27
|
extend CheckingMethods unless options_hash[:checking_methods] == false
|
28
28
|
extend MoveMethods unless options_hash[:move_methods] == false
|
29
|
-
@character = options_hash[:character] || "$ ".
|
30
|
-
@target = options_hash[:target] || "@ ".
|
29
|
+
@character = options_hash[:character] || "$ ".red
|
30
|
+
@target = options_hash[:target] || "@ ".red
|
31
31
|
@current_square = options_hash[:starting_player_location] ? check_coordinates("player", options_hash[:starting_player_location],options_hash[:map]) : [1,1]
|
32
32
|
@target_location = options_hash[:target_location] ? check_coordinates("target", options_hash[:target_location],options_hash[:map]) : [7,11]
|
33
33
|
@map = build_map(options_hash[:map])
|