Create a reaction program
var startScreen = new Text(“Welcome to a speed game! Click space to see the rules “, “13pt New Times Roman”);
var rulesPart1 = new Text(“The goal of the game is to click on every number from least to ” , “11pt New Times Roman”);
var rulesPart2 = new Text(“greatest with your mouse. You will have the time it took to” , “11pt New Times Roman”);
var rulesPart3 = new Text(“complete the game at the top left corner if you decide that” , “11pt New Times Roman”);
var rulesPart4 = new Text(” you want to beat your previous score, please tap” , “11pt New Times Roman”);
var rulesPart5 = new Text(“the F button to start the game” , “11pt New Times Roman”);
var nums = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];
function start(){
startScreen.setPosition(getWidth() / 2 – startScreen.getWidth() / 2, getHeight() / 2);
add(startScreen);
keyDownMethod(titleScreen);
//set rules for how they lose/finish
//start the speedGame
}
function titleScreen(e){
if (e.keyCode == Keyboard.SPACE){
removeAll();
rulesPart1.setPosition(getWidth() / 2 – rulesPart1.getWidth() / 2, getHeight() / 2 – 40);
add(rulesPart1);
rulesPart2.setPosition(getWidth() / 2 – rulesPart2.getWidth() / 2, getHeight() / 2 – 20);
add(rulesPart2);
rulesPart3.setPosition(getWidth() / 2 – rulesPart3.getWidth() / 2, getHeight() / 2 );
add(rulesPart3);
rulesPart4.setPosition(getWidth() / 2 – rulesPart4.getWidth() / 2, getHeight() / 2 + 20);
add(rulesPart4);
rulesPart5.setPosition(getWidth() / 2 – rulesPart5.getWidth() / 2, getHeight() / 2 + 40);
add(rulesPart5);
} else if (e.keyCode == Keyboard.letter(‘F’)){
speedGame();
}
function speedGame(e){
removeAll();
makeRandNum();
mouseClickMethod(disappearNum);
/*delay and make user tap a button to create image where user needs to move around with
keysticks and press space by number order*/
}
}
function disappearNum(e){
}
function makeRandNum(){
for(var i = 0; i < nums.length; i++){
var curNumbers = new Text(nums[i]);
var pastNumbers = new Text(nums[i] – 1);
curNumbers.setPosition (Randomizer.nextInt(0 + curNumbers.getWidth(), getWidth() – curNumbers.getWidth()) , Randomizer.nextInt(0 + curNumbers.getHeight(), getHeight() – curNumbers.getHeight()));
pastNumbers.setPosition (Randomizer.nextInt(0 + pastNumbers.getWidth(), getWidth() – pastNumbers.getWidth()) , Randomizer.nextInt(0 + pastNumbers.getHeight(), getHeight() – pastNumbers.getHeight()) );
curNumbers.getX() != pastNumbers.getX()
curNumbers.getY() != pastNumbers.getY()
add(curNumbers);
}
}
This is the code that I have so far, however feel free to correct anything if needed. I want to have the user go through the numbers from least to greatest and click them, making them disappear. There should be a timer that will end once they make all the numbers disappear. In addition, I would like an end screen along and please make sure the numbers 1-20 don’t overlap. I am willing to pay more if the code is done soon and all the functions work properly (this is a project for CodeHs)
You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.
Latest completed orders:
# | topic title | discipline | academic level | pages | delivered |
---|---|---|---|---|---|
6
|
Writer's choice
|
Business
|
University
|
2
|
1 hour 32 min
|
7
|
Wise Approach to
|
Philosophy
|
College
|
2
|
2 hours 19 min
|
8
|
1980's and 1990
|
History
|
College
|
3
|
2 hours 20 min
|
9
|
pick the best topic
|
Finance
|
School
|
2
|
2 hours 27 min
|
10
|
finance for leisure
|
Finance
|
University
|
12
|
2 hours 36 min
|