chess_validator 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/piece.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7447add6691d3f9071ad8ef282e15e05303916f4190c68a5a8850bceb6f92677
|
4
|
+
data.tar.gz: e462bf916cb48a88e3b1a1150d98fba07e913ea5b030df003dc1c2983c595d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d8d07cd4aef5cdd849581fcd5e7b90d402877abd076b350ac249d29239769646cafd8619e0e2318d140a0800eae1184bae58126889bec28a89e83d63fdf9fc8
|
7
|
+
data.tar.gz: 84335e767809eb2475e1018508e02f015b7f66de2d1bdb89ada50e1213f625a5576f5c534413f9280281893d649214ee3b7e660946980320595f34775f7339fc
|
data/lib/piece.rb
CHANGED
@@ -2,7 +2,8 @@ require_relative './constants/move_key'
|
|
2
2
|
|
3
3
|
module ChessValidator
|
4
4
|
class Piece
|
5
|
-
attr_accessor :position, :piece_type, :color, :square_index, :valid_moves,
|
5
|
+
attr_accessor :position, :piece_type, :color, :square_index, :valid_moves,
|
6
|
+
:targets, :move_potential, :defenders
|
6
7
|
|
7
8
|
def initialize(char, square_index)
|
8
9
|
@piece_type = char
|
@@ -12,6 +13,7 @@ module ChessValidator
|
|
12
13
|
@valid_moves = []
|
13
14
|
@targets = []
|
14
15
|
@move_potential = []
|
16
|
+
@defenders = []
|
15
17
|
end
|
16
18
|
|
17
19
|
def get_position(square_index)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chess_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Ellison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Documentation: https://github.com/chadellison/chess_validator'
|
14
14
|
email: chad.ellison0123@gmail.com
|