-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
27 lines (24 loc) · 1012 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
engine "github.com/andrewjmcgehee/shahgo/engine"
)
// just a driver for random testing for now
func main() {
engine.InitAttacks()
// b := engine.ParseFEN(engine.FenEmpty)
b := engine.ParseFEN(engine.FenStart)
// b := engine.ParseFEN(engine.FenTricky)
// b := engine.ParseFEN(engine.FenKill)
// b := engine.ParseFEN(engine.FenCMK)
engine.DisplayBitboard(b.OccupancyBitboards[engine.White], true)
engine.DisplayBitboard(b.OccupancyBitboards[engine.Black], true)
engine.DisplayBitboard(b.OccupancyBitboards[engine.Both], true)
engine.Move(b, engine.Pawn, engine.D2, engine.D4)
engine.Move(b, engine.Pawn, engine.F7, engine.F5)
engine.Move(b, engine.Pawn, engine.C2, engine.C4)
engine.Move(b, engine.Pawn, engine.F5, engine.F4)
engine.DisplayBitboard(engine.MaskBishopAttacksWithOccupancy(engine.C1, b.OccupancyBitboards[engine.Both]), true)
if b.OccupancyBitboards[engine.Both] != b.OccupancyBitboards[engine.White]|b.OccupancyBitboards[engine.Black] {
panic("blah")
}
}