Skip to content

Commit 4e66d76

Browse files
authored
Merge pull request #634 from joshuarayton/master
typo: bitshop -> bishop
2 parents f45bdcf + 0050d3d commit 4e66d76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ 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
8-
def rookIndex(occupied: Long): Int = (factor * (occupied & mask) >>> (64 - 12)).toInt + offset
7+
def bishopIndex(occupied: Long): Int = (factor * (occupied & mask) >>> (64 - 9)).toInt + offset
8+
def rookIndex(occupied: Long): Int = (factor * (occupied & mask) >>> (64 - 12)).toInt + offset
99

1010
object Magic:
1111
@static

0 commit comments

Comments
 (0)