bloodymines 0.1.4 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/bin/bloodymines CHANGED
@@ -2,10 +2,8 @@
2
2
  # An example of how to use the bloodymines game egnine within a curses program.
3
3
 
4
4
  require File.dirname(__FILE__) + "/../lib/bloodymines"
5
- require File.dirname(__FILE__) + "/../lib/tui"
5
+ require File.dirname(__FILE__) + "/../lib/bloodymines/tui"
6
6
 
7
- # Here I will extend the Bloodymines class with the displaying methods for a
8
- # text UI
9
7
  class Bloodymines
10
8
  include TUI
11
9
  end
data/lib/bloodymines.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require File.dirname(__FILE__) + "/minefield"
2
2
 
3
3
  class Bloodymines
4
- attr_reader :minefield, :x_max, :y_max
4
+ attr_reader :minefield, :width, :height
5
5
  def initialize(params={})
6
6
  params = { :difficulty => :beginner }.merge params
7
7
  @minefield = MineField.new(:difficulty => params[:difficulty])
File without changes
data/lib/minefield.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class MineField
2
- attr_accessor :fields, :difficulty
2
+ attr_reader :fields, :difficulty
3
3
 
4
4
  BEGINNER_WIDTH, BEGINNER_HEIGHT, BEGINNER_MINES = 8, 8, 10
5
5
  INTERMEDIATE_WIDTH, INTERMEDIATE_HEIGHT, INTERMEDIATE_MINES = 16, 16, 40
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloodymines
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - !binary |
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-08-19 00:00:00 +02:00
20
+ date: 2010-08-20 00:00:00 +02:00
21
21
  default_executable:
22
22
  dependencies: []
23
23
 
@@ -30,9 +30,9 @@ extensions: []
30
30
  extra_rdoc_files: []
31
31
 
32
32
  files:
33
+ - lib/bloodymines/tui.rb
33
34
  - lib/bloodymines.rb
34
35
  - lib/minefield.rb
35
- - lib/tui.rb
36
36
  - test/test_minefield.rb
37
37
  - bin/bloodymines
38
38
  has_rdoc: true