Click here to Skip to main content
15,895,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

I'm developing a little simon says style game based on the brilliant code provided from: http://codeplanet.io/building-simon-says-javascript/[]

Although this code has helped me to get me started I'm wanting manipulate it slightly so that after the start button is clicked five squares are chosen at random, and one by one animate their opacity slightly to denote a sequence to the user. At this point the user would then be prompted on-screen to attempt to copy the pattern just shown.

I'm pretty knew to JavaScript but I have a feeling that it has something to do with this code:

JavaScript
randomNumber: function() {
        // between 1 and 9
        return Math.floor((Math.random()*9)+1);
    }
};


I'm just not too sure how to edit it to solve the issue. You can see my working model at : http://www.edwardmanson.com/test-game/

Any help would be massively appreicated as I would like to pass it on to the client on Saturday.

Thanks

Edward
Posted
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900