Color
dicechess.engine.domain.Models$package.Color
object Color
Represents the player colors: White (0) or Black (1).
Uses bitwise XOR for fast toggling between opponents.
Attributes
- Source
- Models.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Color.type
Members list
Value members
Concrete methods
Safe builder to validate boundary invariants.
Givens
Givens
Attributes
- Source
- Models.scala
Extensions
Extensions
extension (color: Color)
Returns true when this color is Black.
Returns true when this color is White.
Returns the opposing color. Implemented as XOR for branch-free toggling.
Returns the opposing color. Implemented as XOR for branch-free toggling.
Attributes
- Source
- Models.scala
Exposes the underlying Int value (0 = White, 1 = Black).
In this article