chess_validator 0.2.18 → 0.2.19

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/board_logic.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 202313773f05394e520671d1b1eeab59d276538e61d964bb9bd21597ce7042d7
4
- data.tar.gz: 752963d28e3592b347f1db3c417e9db721615ddf188052191c92086b3f5fa42e
3
+ metadata.gz: 293d47ecb588b6f6654cf76c014d242980c74f4c0f9b155d9b19e656bf7fcac6
4
+ data.tar.gz: 4a3b4ce1c0c0013514474f3cfa6a62bf6088581cbbb6ec0b2723b2c0b9421140
5
5
  SHA512:
6
- metadata.gz: 0cd85183d720a2465656083e73762239ffae92b3bf76642f295a409018c1f428cccda0f0fa56e36c706a4f98b5c3d62a14865c13294905392b14c397893ecb8b
7
- data.tar.gz: 903adcb0813f761a5eaa293beac38d19091168f4bb3bb5f8f9fd49669471bf209df438301fb6ad49057f6fd6d0b0af54add121891ccfe63a4289c77f55e2ac69
6
+ metadata.gz: cbe22e6fdb5bb096f8ca66ec790d7f21d5e1077e1ac8cffd6074742277cb17a91c47b5a0ce6ecc27dc2227111fbac0b888eb1394c98b8b57d07af6814c156699
7
+ data.tar.gz: a99822336ff54cac4d82797e7d73288ccb1d6954870b2c1c23e4a0b8fe5c3d92289be5f13b8405ce82401469e83cd983d08c38565477106b7c8e8df1c9faff8b
@@ -38,10 +38,10 @@ module ChessValidator
38
38
  def self.handle_castle(castling, piece, board)
39
39
  return castling if castling == '-'
40
40
  castling.delete!('K') if board[64].nil? || board[64].piece_type != 'R'
41
- castling.delete!('K') if board[61].nil? || board[61].piece_type != 'K'
41
+ castling.delete!('KQ') if board[61].nil? || board[61].piece_type != 'K'
42
42
  castling.delete!('Q') if board[57].nil? || board[57].piece_type != 'R'
43
43
  castling.delete!('k') if board[8].nil? || board[8].piece_type != 'r'
44
- castling.delete!('k') if board[5].nil? || board[5].piece_type != 'k'
44
+ castling.delete!('kq') if board[5].nil? || board[5].piece_type != 'k'
45
45
  castling.delete!('q') if board[1].nil? || board[1].piece_type != 'r'
46
46
  castling.size == 0 ? '-' : castling
47
47
  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.18
4
+ version: 0.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Ellison