Skip to content

Commit f1b9935

Browse files
committed
typo: bitshop -> bishop
1 parent f45bdcf commit f1b9935

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/scala/bitboard/Bitboard.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ object Bitboard:
3434
extension (s: Square)
3535

3636
def bishopAttacks(occupied: Bitboard): Bitboard =
37-
ATTACKS(Magic.BISHOP(s.value).bitshopIndex(occupied))
37+
ATTACKS(Magic.BISHOP(s.value).bishopIndex(occupied))
3838

3939
def rookAttacks(occupied: Bitboard): Bitboard =
4040
ATTACKS(Magic.ROOK(s.value).rookIndex(occupied))

core/src/main/scala/bitboard/Magic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package bitboard
44
import scala.annotation.static
55

66
class Magic(val mask: Long, val factor: Long, val offset: Int):
7-
def bitshopIndex(occupied: Long): Int = (factor * (occupied & mask) >>> (64 - 9)).toInt + offset
7+
def bishopIndex(occupied: Long): Int = (factor * (occupied & mask) >>> (64 - 9)).toInt + offset
88
def rookIndex(occupied: Long): Int = (factor * (occupied & mask) >>> (64 - 12)).toInt + offset
99

1010
object Magic:

0 commit comments

Comments
 (0)