Code your own adventure2 - Coding a chess game opening


#1

Good day kind forum, I need assistance in knowing how to get my code to stop skipping all the way to default in my code - it goes straight to black, white will need to play first as in chess in real life.


var user = prompt("Are your ready to play chess? Choose your first move").toLowerCase();

switch(user) {
case 'e4':
var choice1 = e4;
var choice2 = e3;
if(choice1 && choice2 === yes) {
console.log("King pawn to e4, this is the King pawn's opening")} else {
console.log("King pawn to e3, this is the King pawn's opening")

        }
    break;
case 'd4':
    var choice3 = d4;
    var choice4 = d3;
    if(choice3 || choice4 === yes){
    console.log("Queen pawn to d4, this is the Queen's pawn opening")} else {console.log("Queen pawn to d3, this is the Queen's pawn opening")

    }
    break;
case 'c4':
    console.log("Bishop pawn to c4, this is the English opening");
    break;
default:
    console.log("Blacks turn to play");

}


#2

@r2d2_12,
Have a look at
http://discuss.codecademy.com/t/code-your-own-adventure2-coding-a-chess-game-opening/23856/2?u=leonhard_wettengmx_n