Stores open squares in the boards state to avoid recomputation.
Split Board.pieces into Board.same and Board.opponent.
Use a lazy val for leaves, fixed evaluation counter and sort leaves by score.