uyasar,
Thanks for your comment.
Do you want to give feedback based on specific wrong moves?
Example: if the best move is Queen to e8 and the user moves his Queen to e7, you provide a message describing Qe8 and why it's not the best move.
If so, It might be possible that variations can be used for this purpose, but it will be an exception from the default behaviour.
The default behaviour of DHTML Chess and tactics is that variations are used as valid moves to solve a puzzle. Let me give you an example:
Code: Select all
[white "White mates in 5"]
[result "1-0"]
[fen "r3k1nr/pp1n2pp/1bp1N1q1/6B1/2B1p3/8/PPP2RPP/R2Q3K w kq - 0 1"]
[plycount "9"]
1. Qxd7+ Kxd7 2. Rd1+ Kc8 3. Rf8+ Qe8 4. Rxe8+ Bd8 5. Rdxd8# (5. Rexd8#)
In this example, the moves Rdxd8# and Rexd8# are both accepted as valid checkmate moves.
If you want to provide feedback based on specific wrong moves made by the user, it's easiest to create an exception from the default behaviour described above. Example:
Code: Select all
[White "Ruy Lopez"]
[Black ""]
...
...
1. e4 { good move } (1. d4 { Sorry, that' not the correct first move for the Spanish opening } )
I need a few days to think about this. It's a good feature and easy to implement, but I want to find the best and most intuitive way to develop this.
---
Alf