projects
/
stockfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55a3e0a
)
Simplify a condition in is_KXK()
author
Marco Costalba
<mcostalba@gmail.com>
Thu, 19 Jun 2014 13:44:42 +0000
(15:44 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Thu, 19 Jun 2014 13:44:42 +0000
(15:44 +0200)
No functional change.
src/material.cpp
patch
|
blob
|
history
diff --git
a/src/material.cpp
b/src/material.cpp
index 9a120661eb249306d1a52994a4485ea1b6bf60f9..0949a1bf418a899072865ad043d1048c39a1598b 100644
(file)
--- a/
src/material.cpp
+++ b/
src/material.cpp
@@
-66,8
+66,7
@@
namespace {
// Helper templates used to detect a given material distribution
template<Color Us> bool is_KXK(const Position& pos) {
const Color Them = (Us == WHITE ? BLACK : WHITE);
- return !pos.count<PAWN>(Them)
- && pos.non_pawn_material(Them) == VALUE_ZERO
+ return !more_than_one(pos.pieces(Them))
&& pos.non_pawn_material(Us) >= RookValueMg;
}