chess_validator 0.2.12 → 0.2.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/move_logic.rb +1 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a006e9c1c24dde53b0fbeee967b13766dcc1c0542b762e61d9524b97df54013f
4
- data.tar.gz: 9fd1a718b84f9d750bfd1c461ef779dc34d23b317c968c585d2ff618be80c815
3
+ metadata.gz: 03b73d5695fddf48ea9494d65ce26cdea0c3400edf94f12a1ae16565a60ca999
4
+ data.tar.gz: ad5ed89124d328363f8f6f193710b827ad21cf5aeb0e4cd95a75041c8068fe7d
5
5
  SHA512:
6
- metadata.gz: 34e9d0d4265596bb2acbf7ec906d8c81a1097534a159bc90f8728c8faee0d7863b45790d78ffa35de035d81e2809674454c9284a8bac8683d75df6c832d4f078
7
- data.tar.gz: '08d4e0d4411ee9908d69559ffabe2134db7f48ac9bcfda47689f82999cfa8a55b423041e3473759a256cb573efc0f73317a5e5c25ede2bb12ead5ef89a7c5b02'
6
+ metadata.gz: f0b7b7b5f1bc7888385a488e5c1304671ac2122777a06a74061799891b3656be37938a531d912ecf74698fccbcdefeb476d423c9d40dfd5dac53daf3c0abadec
7
+ data.tar.gz: 8b76ad106e6a34fc82e48baea5f125aa0a7271a99c3b2e04dcf2874f728de0909c93f6b89e454fa896b318198f81539f96c66f2d7cc5ccfc222449e612eeb9f3
@@ -210,7 +210,7 @@ module ChessValidator
210
210
  def valid_destination?(piece, board, move)
211
211
  target_piece = find_piece(board, move)
212
212
  if target_piece
213
- target_piece.color != piece.color
213
+ target_piece.color != piece.color && piece.piece_type.downcase != 'k'
214
214
  else
215
215
  true
216
216
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chess_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Ellison
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.2.3
45
+ rubygems_version: 3.1.2
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: A chess move validator