mirror of
https://github.com/maaslalani/gambit.git
synced 2024-11-24 08:22:12 +02:00
use new
This commit is contained in:
parent
528166050a
commit
044a48b66e
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user