From bfab10115ec4ffa1d555c0fa1653b64703029ff3 Mon Sep 17 00:00:00 2001 From: Thanh Le Date: Fri, 25 Oct 2024 20:45:10 +0200 Subject: [PATCH] Make Square.unsafe private --- core/src/main/scala/Square.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/Square.scala b/core/src/main/scala/Square.scala index a90f3b6d..a2aad42a 100644 --- a/core/src/main/scala/Square.scala +++ b/core/src/main/scala/Square.scala @@ -66,8 +66,8 @@ object Square: inline def apply(inline file: File, inline rank: Rank): Square = file.value + 8 * rank.value - inline def apply(index: Int): Option[Square] = Option.when(0 <= index && index < 64)(index) - def unsafe(index: Int): Square = index + inline def apply(index: Int): Option[Square] = Option.when(0 <= index && index < 64)(index) + private[chess] def unsafe(index: Int): Square = index inline def at(x: Int, y: Int): Option[Square] = Option.when(0 <= x && x < 8 && 0 <= y && y < 8)(x + 8 * y)