1
0
mirror of https://github.com/maaslalani/gambit.git synced 2024-11-24 08:22:12 +02:00
This commit is contained in:
Maas Lalani 2021-12-22 23:26:07 -05:00
parent 528166050a
commit 044a48b66e
No known key found for this signature in database
GPG Key ID: 5A6ED5CBF1A0A000

View File

@ -6,7 +6,6 @@ import (
"strings"
"github.com/maaslalani/gambit/piece"
"github.com/maaslalani/gambit/position"
)
var ErrInvalidFEN = errors.New("Invalid FEN")
@ -59,8 +58,7 @@ func (b Board) ToFen() string {
}
func FromFen(fen string) (Board, error) {
var b Board
b.Selected = position.NoPosition
var b Board = New()
parts := strings.Split(fen, " ")
if len(parts) != 6 {