projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove some redundant code [Checkered/Magnetic still buggish]
[vchess.git]
/
public
/
javascripts
/
components
/
game.js
diff --git
a/public/javascripts/components/game.js
b/public/javascripts/components/game.js
index
1863285
..
170aeac
100644
(file)
--- a/
public/javascripts/components/game.js
+++ b/
public/javascripts/components/game.js
@@
-575,7
+575,7
@@
Vue.component('my-game', {
this.newGame("computer");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {
this.newGame("computer");
},
newGame: function(mode, fenInit, color, oppId, moves, continuation) {
- const fen = fenInit || VariantRules.GenRandInitFen();
+ const fen =
"brnbnkrq/pppppppp/8/8/8/8/PPPPPPPP/BNNRKBQR 11111111111111111111";//
fenInit || VariantRules.GenRandInitFen();
console.log(fen); //DEBUG
this.score = "*";
if (mode=="human" && !oppId)
console.log(fen); //DEBUG
this.score = "*";
if (mode=="human" && !oppId)
@@
-635,7
+635,7
@@
Vue.component('my-game', {
}
else //against computer
{
}
else //against 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);
}