mirror of
https://github.com/lichess-org/lila.git
synced 2026-05-26 13:51:00 +00:00
Fail early if word length is >= 100.
This commit is contained in:
committed by
Thibault Duplessis
parent
32877f61b9
commit
99364baaa3
@@ -33,8 +33,8 @@ object String:
|
||||
.filter(_.nonEmpty)
|
||||
.map(word =>
|
||||
if Set("O-O", "O-O-O").contains(word.filter(c => c.isLetter || c == '-')) || {
|
||||
val rowCount = word.split('/').filter(_.nonEmpty).length
|
||||
(rowCount == 8 || rowCount == 9) &&
|
||||
word.length < 100 &&
|
||||
Set(8, 9).contains(word.split('/').filter(_.nonEmpty).length) &&
|
||||
Fen.makeBoard(Crazyhouse, word).isDefined
|
||||
}
|
||||
then word.toLowerCase
|
||||
|
||||
Reference in New Issue
Block a user