minesweeper-console 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -3
- data/lib/minesweeper/console/game_loop.rb +3 -3
- data/lib/minesweeper/console/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db59b3850d1f387a3828662fd4a6c96436d72a2a
|
4
|
+
data.tar.gz: 81ed7584e223da23afed5c313c18f039785b346d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 542b7e65f236de59754d3f29b5c8a768c0d6f1eca95677e9a6da55c3d9c66c64ade923deaa5f7f1949067ae49e2df834360787211ae25b4c7af8a52c3f0e1e42
|
7
|
+
data.tar.gz: a345f7df0bafd7ea0e9be12aac09c6aea7883bb6c5acc30a5ff12b47770428b9bb21b2c0d013ceb8cdeb38ec99122e00f17fc1cf6148dff94e67f0249e8b1e5f
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/svarlet/minesweeper-console.svg?branch=master)](https://travis-ci.org/svarlet/minesweeper-console)
|
2
|
+
[![Coverage Status](https://coveralls.io/repos/svarlet/minesweeper-console/badge.svg?branch=master)](https://coveralls.io/r/svarlet/minesweeper-console?branch=master)
|
3
|
+
|
1
4
|
# Minesweeper::Console
|
2
5
|
|
3
|
-
|
6
|
+
A command line frontend to my minesweeper game. It is based on my [minesweeper-core gem](https://github.com/svarlet/minesweeper-core).
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
@@ -20,11 +23,18 @@ Or install it yourself as:
|
|
20
23
|
|
21
24
|
## Usage
|
22
25
|
|
23
|
-
|
26
|
+
The provided executable takes one integer parameter to set the number of rows and columns.
|
27
|
+
Therefore the minefield will always be a square. The number of mines randomly placed within the minefield is also equal to N.
|
28
|
+
|
29
|
+
```
|
30
|
+
# minesweeper N
|
31
|
+
```
|
32
|
+
|
33
|
+
Have fun !
|
24
34
|
|
25
35
|
## Contributing
|
26
36
|
|
27
|
-
1. Fork it ( https://github.com/
|
37
|
+
1. Fork it ( https://github.com/svarlet/minesweeper-console/fork )
|
28
38
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
39
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
40
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -13,11 +13,11 @@ module Minesweeper
|
|
13
13
|
PROMPT = "(R)eveal, (F)lag, (U)nflag <x> <y>\n>"
|
14
14
|
def initialize(size)
|
15
15
|
@row_count = size
|
16
|
-
@minefield = Minefield.new(@row_count)
|
16
|
+
@minefield = Core::Minefield.new(@row_count)
|
17
17
|
@pretty_printer = Console::PrettyPrinter::MinefieldPrettyPrinter.new(@minefield, Console::PrettyPrinter::Theme::DefaultTheme.new(Rainbow.new))
|
18
18
|
@command_parser = Console::Parser::CommandParser.new(@minefield)
|
19
|
-
mine_generator = Explosives::MineCoordinatesFactory.new(Random.new)
|
20
|
-
@mine_layer = Explosives::MineLayer.new(@minefield, mine_generator)
|
19
|
+
mine_generator = Core::Explosives::MineCoordinatesFactory.new(Random.new)
|
20
|
+
@mine_layer = Core::Explosives::MineLayer.new(@minefield, mine_generator)
|
21
21
|
end
|
22
22
|
|
23
23
|
def start
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minesweeper-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sébastien Varlet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|