projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Slight change in Ultima rules. TODO: merge with removed code 'isAttacked'
[vchess.git]
/
public
/
javascripts
/
components
/
game.js
diff --git
a/public/javascripts/components/game.js
b/public/javascripts/components/game.js
index
cb4d273
..
6af331b
100644
(file)
--- a/
public/javascripts/components/game.js
+++ b/
public/javascripts/components/game.js
@@
-660,6
+660,7
@@
Vue.component('my-game', {
"value": "0",
innerHTML: "None"
},
"value": "0",
innerHTML: "None"
},
+ attrs: { "selected": this.sound==0 },
}
),
h("option",
}
),
h("option",
@@
-668,6
+669,7
@@
Vue.component('my-game', {
"value": "1",
innerHTML: "Newgame"
},
"value": "1",
innerHTML: "Newgame"
},
+ attrs: { "selected": this.sound==1 },
}
),
h("option",
}
),
h("option",
@@
-676,6
+678,7
@@
Vue.component('my-game', {
"value": "2",
innerHTML: "All"
},
"value": "2",
innerHTML: "All"
},
+ attrs: { "selected": this.sound==2 },
}
),
],
}
),
],
@@
-1005,7
+1008,7
@@
Vue.component('my-game', {
this.endGame(this.mycolor=="w"?"0-1":"1-0");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {
this.endGame(this.mycolor=="w"?"0-1":"1-0");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {
- const fen = fenInit || VariantRules.GenRandInitFen();
+ const fen =
"M7/8/8/3K1k2/8/8/8/8 0000";//
fenInit || VariantRules.GenRandInitFen();
console.log(fen); //DEBUG
if (mode=="human" && !oppId)
{
console.log(fen); //DEBUG
if (mode=="human" && !oppId)
{
@@
-1063,7
+1066,7
@@
Vue.component('my-game', {
}
else if (mode == "computer")
{
}
else if (mode == "computer")
{
- this.mycolor = Math.random() < 0.5 ? 'w' : 'b';
+ this.mycolor =
"w";//
Math.random() < 0.5 ? 'w' : 'b';
if (this.mycolor == 'b')
setTimeout(this.playComputerMove, 500);
}
if (this.mycolor == 'b')
setTimeout(this.playComputerMove, 500);
}