Sha256: d424513098f61bd4830801ed1b9fe20680afebd33ade7f40ceb45b9fbefef68e
Contents?: true
Size: 625 Bytes
Versions: 10
Compression:
Stored size: 625 Bytes
Contents
module BoardEvaluation def evaluate material_evaluation + piece_location_evaluation end def material_evaluation white_evaluation = friendly_pieces(:white).map(&:value).sum black_evaluation = -friendly_pieces(:black).map(&:value).sum white_evaluation + black_evaluation end def piece_location_evaluation white_evaluation = friendly_pieces(:white).map(&:location_value).sum black_evaluation = -friendly_pieces(:black).map(&:location_value).sum white_evaluation + black_evaluation end def evaluate_move(move, color) provisional(move, color) do evaluate end end end
Version data entries
10 entries across 10 versions & 1 rubygems