prevent free analysis of unsupported variants - resolves #234
This commit is contained in:
parent
415efbf928
commit
c91fca6d77
|
@ -1,5 +1,7 @@
|
|||
var chessground = require('chessground');
|
||||
|
||||
var movableVariants = ['standard', 'chess960', 'threecheck', 'fromPosition'];
|
||||
|
||||
function makeConfig(data, situation, onMove) {
|
||||
return {
|
||||
fen: situation.fen,
|
||||
|
@ -7,6 +9,7 @@ function makeConfig(data, situation, onMove) {
|
|||
lastMove: situation.lastMove,
|
||||
orientation: data.player.color,
|
||||
coordinates: data.pref.coords !== 0,
|
||||
viewOnly: movableVariants.indexOf(data.game.variant.key) === -1,
|
||||
movable: {
|
||||
free: false,
|
||||
color: situation.movable.color,
|
||||
|
|
Loading…
Reference in a new issue