Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Grand Apothecary Chess-Alert. (Updated!) Very large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Aug 24, 2021 04:15 PM UTC in reply to H. G. Muller from 02:00 PM:

would it be possible to have GAME code support operators nolower and noupper, as analogs to isupper and islower?

No, those are already in use for returning arrays of spaces. Also, PHP doesn't have a ctype function for what you want.

E.g. nolower would return true if its string argument would not contain any lower case characters, i.e. if it is all upper case, digits or punctuation.

With #0 standing in for the space with the piece in question, try using match #0 nolower. This will check whether it's among the spaces whose pieces have no lowercase letters in them. Or with #0 as the piece label, you could try not fnmatch "*[a-z]*" space #0. This checks it against a wildcard pattern for containing any lowercase ASCII characters, then negates the result.