just_chess 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38ce8605d1d5167d391e2e06a4a6d28142407eedde3f205bcde6ae968434b379
4
- data.tar.gz: 0752b975ab1bdfba925c47084fa5b8cc4ad288c048ffcb58b5ff7c7f71df176a
3
+ metadata.gz: 5186354e9db002dd6613734861ca814ccea3753b399c4187070a8e9ecd9fb654
4
+ data.tar.gz: 7e046eb71b17b5edfcc6f4c4e612c45b1a3139ab08ad5472b96ccaa38faeb425
5
5
  SHA512:
6
- metadata.gz: a808d5ce4e319f0bd66d6bb4690d918ac8c9b352bf32280dc21b127a92feb09c12d6be14b18258ea079a6da171db0182183950c96c0ab4ac2897c0f2e6ce6064
7
- data.tar.gz: cfa71cf6d775dc597eae274bcf269bc097c46f420bcea75f771497b9d6382a1752b115ebfc1e2a3031018de5b76774a99fe0808b9415e8c80acc68f5cbc305ef
6
+ metadata.gz: caeee8d99463adb0a5c09d3422c456a38d57857db78bb1ae3b84606d0624cc9632335ca95a0be2c5d00518b85b1e50710eb42737bac7a8c29f4389c3c4f90223
7
+ data.tar.gz: ea82ca8a6ff509df44d04c4585f7e16643408e31cbd926774c0d1be6ad46c05f8d0dadf8e2ac9d05f28e11f0ed1478910e397f425f7ca554e76b522b59325dc3
@@ -268,7 +268,8 @@ module JustChess
268
268
  if to.occupied?
269
269
  to
270
270
  else
271
- if from.piece.is_a?(Pawn) && from.piece.en_passant_square(from, self)
271
+ en_passant_square = from.piece.is_a?(Pawn) && from.piece.en_passant_square(from, self)
272
+ if en_passant_square && en_passant_square.x == to.x
272
273
  squares.find_by_piece_id(last_double_step_pawn_id)
273
274
  else
274
275
  nil
@@ -113,4 +113,4 @@ module JustChess
113
113
  STARTING_RANK[player_number]
114
114
  end
115
115
  end
116
- end
116
+ end
@@ -1,4 +1,4 @@
1
1
  module JustChess
2
2
  # :nodoc:
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.7"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just_chess
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Humphreys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-13 00:00:00.000000000 Z
11
+ date: 2020-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler