notnil / chess

chess package for go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MoveHistory() panics regarding Comments when built programatically

barakmich opened this issue · comments

To reproduce:

  func TestMoveHistory(t *testing.T) {
    game := chess.NewGame()
    game.MoveStr("e4")
    game.MoveStr("e5")
    game.Resign(chess.Black)
    history := game.MoveHistory() // Panics here
    if len(history) != 2 {
      t.Fatal("Didn't retrieve full history")
    }
  }

That there's also no way to make a move with comments.... well, I guess that's #89