a_maze_ing 0.2.2 → 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/.gitignore +1 -1
- data/README.md +2 -2
- data/a_maze_ing.gemspec +1 -0
- data/bin/a_maze_ing +2 -1
- data/lib/a_maze_ing/cli.rb +45 -0
- data/lib/a_maze_ing/configuration.rb +11 -0
- data/lib/a_maze_ing/maze.rb +2 -2
- data/lib/a_maze_ing/version.rb +1 -1
- data/lib/a_maze_ing.rb +2 -1
- metadata +17 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7fb0b68dd5272233aacbaf58ba3171c3868b5bb
|
4
|
+
data.tar.gz: efb0b850c4c09a1b0e93df8ea343e65109ca47ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f2a6c7732b8cf21090d0a626925d178e7fd9933a91d75a7cacd62f89acbb63811e86e2f700c2e452c63ab6ef2b8f9265347455fe4b9e470be6ac048f9de6d03
|
7
|
+
data.tar.gz: '08fd8dc8244cf49114533fba404a97f00fcb56c9fd95391c7b03d69abc7d2684cfeffe69010bdd67416644fa0dd37403153d7231dd2a8030e3efbca4a047e147'
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This is a small video game about maze, create on Gosu library. You need to find the way to specific point in the maze to win the game
|
4
4
|
|
5
|
-
(./images/cover.jpg)
|
5
|
+
![](./images/cover.jpg?raw=true)
|
6
6
|
|
7
7
|
## Requirements
|
8
8
|
|
@@ -45,4 +45,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
45
45
|
|
46
46
|
## Contributing
|
47
47
|
|
48
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
48
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/at-cuongtran/a_maze_ing.
|
data/a_maze_ing.gemspec
CHANGED
data/bin/a_maze_ing
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'commander'
|
3
|
+
|
4
|
+
module AMazeIng
|
5
|
+
class CLI
|
6
|
+
include Commander::Methods
|
7
|
+
|
8
|
+
def run
|
9
|
+
@full_screen = false
|
10
|
+
|
11
|
+
# program :name, AMazeIng::Configuration::PROGRAM_NAME
|
12
|
+
program :name, "AMazeIng"
|
13
|
+
program :version, AMazeIng::VERSION
|
14
|
+
# program :description, AMazeIng::Configuration::DESCRIPTION
|
15
|
+
program :description, "Maze solving game... don't be addicted"
|
16
|
+
|
17
|
+
default_command :classic
|
18
|
+
|
19
|
+
global_option('-f', '--fullscreen', 'Render window at full screen') {
|
20
|
+
@full_screen = true
|
21
|
+
}
|
22
|
+
|
23
|
+
command :classic do |c|
|
24
|
+
c.syntax = 'a_maze_ing classic [options]'
|
25
|
+
c.description = 'Classic mode, difficulty increase with level'
|
26
|
+
c.action do
|
27
|
+
AMazeIng::GameWindow.new(@full_screen).show
|
28
|
+
end
|
29
|
+
end
|
30
|
+
# command :bar do |c|
|
31
|
+
# c.syntax = 'foobar bar [options]'
|
32
|
+
# c.description = 'Display bar with optional prefix and suffix'
|
33
|
+
# c.option '-p', '--prefix STRING', String, 'Adds a prefix to bar'
|
34
|
+
# c.option '-s', '--suffix STRING', String, 'Adds a suffix to bar'
|
35
|
+
# c.action do |args, options|
|
36
|
+
# options.default :prefix => '(', :suffix => ')'
|
37
|
+
# say "#{options.prefix}bar#{options.suffix}"
|
38
|
+
# end
|
39
|
+
# end
|
40
|
+
|
41
|
+
run!
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module AMazeIng
|
2
|
+
module Configuration
|
3
|
+
|
4
|
+
# Program configurations
|
5
|
+
PROGRAM_NAME = "AmazeIng".freeze
|
6
|
+
AUTHOR = "Cuong Tran <tranhuu.phucuong@gmail.com>".freeze
|
7
|
+
DESCRIPTION = "Maze solving game... don't be addicted".freeze
|
8
|
+
MORE_HELP_URL = "https://github.com/at-cuongtran/a_maze_ing".freeze
|
9
|
+
|
10
|
+
end
|
11
|
+
end
|
data/lib/a_maze_ing/maze.rb
CHANGED
@@ -8,8 +8,8 @@ module AMazeIng
|
|
8
8
|
SIDE_BAR = 180
|
9
9
|
class GameWindow < Window
|
10
10
|
$rows = $cols = 10
|
11
|
-
def initialize
|
12
|
-
super DIMENSION + SIDE_BAR, DIMENSION,
|
11
|
+
def initialize(full_screen)
|
12
|
+
super DIMENSION + SIDE_BAR, DIMENSION, full_screen, 1
|
13
13
|
self.caption = "Maze"
|
14
14
|
generate_maze
|
15
15
|
@infor = Infor.new
|
data/lib/a_maze_ing/version.rb
CHANGED
data/lib/a_maze_ing.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a_maze_ing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- at-cuongtran
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.12.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: commander
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 4.4.3
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 4.4.3
|
69
83
|
description: "A fun and easy to play maze game with graphic. \n Maze randomly generate
|
70
84
|
with difficulty increase evey level"
|
71
85
|
email:
|
@@ -88,6 +102,8 @@ files:
|
|
88
102
|
- images/cover.jpg
|
89
103
|
- lib/a_maze_ing.rb
|
90
104
|
- lib/a_maze_ing/cell.rb
|
105
|
+
- lib/a_maze_ing/cli.rb
|
106
|
+
- lib/a_maze_ing/configuration.rb
|
91
107
|
- lib/a_maze_ing/infor.rb
|
92
108
|
- lib/a_maze_ing/maze.rb
|
93
109
|
- lib/a_maze_ing/player.rb
|