douglasbagnall / p4wn

a smallish turn-of-the-century javascript chess engine
http://p4wn.sf.net
113 stars 33 forks source link

Going back in history is broken #8

Closed chanibal closed 12 years ago

chanibal commented 12 years ago

History goes back much more then it is ordered to. Also the example interface doesn't cope with this problem and goes out of sync.

douglasbagnall commented 12 years ago

Thanks, I will look into this.

The whole history thing got a bit mucked up with the introduction of FEN loading, because loading arbitrary FEN breaks the relationship between move numbers and the length of the history list. Before that, the move number was an index into the history list and it was all simple. It really still ought to be fairly simple, but I haven't paid it enough attention.

douglasbagnall commented 12 years ago

Fixed in 9ecf0f5 and differently in 5fdfeabd00563899b9148.

The out-of-sync game log in display.js was fixed with 14edbbcfabafd476.

Thanks again Chanibal.