chess_validator 0.2.22 → 0.2.23

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 +5 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc464703452ec24fc25c8d122099e52b9788ef81df4d2a3acd2fca332d86c7b2
4
- data.tar.gz: 11ca33717e5306eaf1538ecb65b55280bfd0c6f5f7b485cd78d540e36d72d726
3
+ metadata.gz: d61b299ea0d6ec07579ccb0b6d34ec50a7d5835960ae866469f653c4f7d43d06
4
+ data.tar.gz: cbc0f79075fa4f497b2ac8128864acab023da94a74e68efcfe87ff0c4d4950b5
5
5
  SHA512:
6
- metadata.gz: 4f4e734ca21f8022cf210effe194057edd9c4302574ce15dc3929858f0426d1992f32c0ab185bf38236ceb6b05fc380a1934589a575eb5278598e96c13826ec5
7
- data.tar.gz: 2a60f66b946b0e8203c0c79cf8d772b483befbd82b1935ddfa959fe9c424d8056fba1aa5978dfcf6b9d0b7413840b0f85ddc58f22de7a90485b0c79f4e923c62
6
+ metadata.gz: 952a4c3df07b35e8ef83ee10e72b5488c6cb57a4c09f2e3b1d56de1a37a2024545d7d682812b7497fa6884994453616933437872ac4db47554afec12586c97e5
7
+ data.tar.gz: d86e7337b4e0616b7dc8bf67aef635e87ddec04fe96d4a395ccfc118c45255f1edade66acc98e42c9a6d6672c2e04247ef712e1a6e576e999156b08eca7dd627
data/lib/move_logic.rb CHANGED
@@ -12,7 +12,7 @@ module ChessValidator
12
12
 
13
13
  board = get_board(fen.to_s)
14
14
  pieces = []
15
-
15
+
16
16
  board.values.each do |piece|
17
17
  if piece.color == fen.active
18
18
  load_move_data(board, piece, fen)
@@ -348,18 +348,18 @@ module ChessValidator
348
348
  end
349
349
 
350
350
  def defended_pieces_by_square(fen_notation)
351
- return defended_sets[fen_notatioin] if defended_sets[fen_notatioin]
351
+ return defended_sets[fen_notation] if defended_sets[fen_notation]
352
352
 
353
353
  board = get_board(fen_notation)
354
354
 
355
355
  fen = PGN::FEN.new(fen_notation)
356
356
  space_index = {}
357
-
357
+
358
358
  pieces = board.values.map do |piece|
359
359
  space_index[piece.position] = piece.piece_type + piece.color
360
360
  piece
361
361
  end
362
-
362
+
363
363
  defended = Hash.new([])
364
364
 
365
365
  pieces.each do |piece|
@@ -370,7 +370,7 @@ module ChessValidator
370
370
  end
371
371
  end
372
372
 
373
- defended_sets[fen_notatioin] = defended
373
+ defended_sets[fen_notation] = defended
374
374
  defended
375
375
  end
376
376
 
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.22
4
+ version: 0.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Ellison