battle_boats 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd682e0861405e9ba63712042de47b7535a90818
4
- data.tar.gz: 0e7466e52726d61e276e96070b8e79784177713c
3
+ metadata.gz: 8a2ea56e68cade1efeca6c47d3e9e7f8fb8c7155
4
+ data.tar.gz: 4d2b2ebc69e8cdbe6ae0438edf7b3df2d35b8843
5
5
  SHA512:
6
- metadata.gz: 9760256d3da92abed54880362f771dabcf02dac95b5c43f0e99544ee5dce26458c6dda6c320a5a24e19c9d153adcea5d7d39bb4e96a9174b0806d27188eeb243
7
- data.tar.gz: 3f098298b553b2db0e6c950a5743c96e5a36110108a37bb2cf75d143bca1d836eb7b52dc7ca1aefc94fde18414b25fe9223a3aad77ce1217851b85929f91e307
6
+ metadata.gz: fbeb648094a0bc1fc56861eab3f5833af25239079b484f000801f40e73979b8f3024ce26cdb19554ff3be1b17f9c03c86f5d5bd8bd66fd84da5ad7f832d3cd75
7
+ data.tar.gz: 3618838dd7400e8c03853491fe5af3bbf22df9f21fa8615abd9f937ba003af3e7db2f6fcddf8490bdff3a298363dc691bd2efdd174e6ba920ee8ebc626fdd066
@@ -1,3 +1,8 @@
1
+ # 0.2.2
2
+ ### New Features
3
+ - Replaced -d and --development option flags to enter developer mode
4
+ - Enemy ships are visible in developer mode
5
+
1
6
  # 0.2.1
2
7
  ### Enhancements
3
8
  - Various enhancements and bug fixes
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- battle_boats (0.2.1)
4
+ battle_boats (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -3,6 +3,11 @@
3
3
  require 'battle_boats/engine'
4
4
  require 'battle_boats/board'
5
5
 
6
+ if ARGV[0] == "-d" || ARGV[0] == "--development"
7
+ BattleBoats::DEVELOPMENT = true
8
+ end
9
+
10
+
6
11
  enemy_board = BattleBoats::Board.new
7
12
  enemy_board.place_ships_randomly
8
13
 
@@ -1,5 +1,6 @@
1
1
  require_relative "coordinate"
2
2
  require_relative "board_formatter"
3
+ require_relative "environment"
3
4
 
4
5
  module BattleBoats
5
6
  class ConsoleUI
@@ -16,7 +17,8 @@ module BattleBoats
16
17
  end
17
18
 
18
19
  def display_board(board)
19
- output.puts board_formatter.format_board(board, hide_ships: true)
20
+ hide_ships = !BattleBoats::DEVELOPMENT
21
+ output.puts board_formatter.format_board(board, hide_ships: hide_ships)
20
22
  end
21
23
 
22
24
  def display_ally_board(board)
@@ -0,0 +1,3 @@
1
+ module BattleBoats
2
+ DEVELOPMENT = false
3
+ end
@@ -1,3 +1,3 @@
1
1
  module BattleBoats
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: battle_boats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Countz
@@ -113,6 +113,7 @@ files:
113
113
  - lib/battle_boats/console_ui.rb
114
114
  - lib/battle_boats/coordinate.rb
115
115
  - lib/battle_boats/engine.rb
116
+ - lib/battle_boats/environment.rb
116
117
  - lib/battle_boats/fleet.rb
117
118
  - lib/battle_boats/null_ship.rb
118
119
  - lib/battle_boats/ship.rb