Freelance Android Application Developers
Hire highly qualified and dedicated android application developers from around the world. Post jobs for freelance android developer

seen from United States
seen from United States
seen from Brazil

seen from Germany
seen from China

seen from Russia
seen from China
seen from China
seen from China
seen from United States
seen from China

seen from Netherlands

seen from United States

seen from United States

seen from United States
seen from Türkiye

seen from United States
seen from Australia
seen from United States
seen from Belarus
Freelance Android Application Developers
Hire highly qualified and dedicated android application developers from around the world. Post jobs for freelance android developer
Version 0.07
After V0.06, I think that the majority of the actual gameplay code is completed. I'm sure that there are many more features and functions that I will want to add, but for now, the game (although basic) works.
An issue I’ve noticed is the ability to spam the startBtn numerous times. This is having an impact on the time difference between counts and the functionality of the stopBtn. To fix this issue, I’ve created 2 new boolean variables - startBtnActive & stopBtnActive. I set startBtnActive to true and stopBtnActive to false when the game first loads. Then inside of the button press functions, I added IF statements to only run if the ACTIVE boolean is equal to true. I also added commands to swap the value of each boolean. You can see the changes below:
As I was testing this new code (which works as expected) I discovered another bug. When the printout reaches ‘X’ you can still press stop and calm points 1 higher than the last number displayed. EG, if the last number to appear before the X was 3, you would be awarded 4 points:
Initially I thought it would be an easy fix - I could just add the code
stopBtnActive = false
to the ELSE part of the IF statement, however, this proved ineffective. I then added a third condition to the IF statement, another && to say that IF the count had reached an ‘X’ to go to the ELSE part
if (count < holdingValue + 1) && (hasStopBtnPressed == false) && (stringsArray[count] != "X")
This also proved both effective and ineffective. Whilst it did stop me from being able to press stop on the ’X’, the issue is that there isn't an ‘X’ displayed anymore.
Also, because the score printout appears in the stopBtn function if the turn reaches ‘X’ the total score isn't displayed to the player. This was happening already, however, now seemed like a good time to try and fix it as well. Ideally, this will be displayed regardless at the end of a turn.
After a lot of trial and error, I managed to find a solution that works. Firstly, I created a new function called endOfTurn. In this function, I added everything that I wanted to be displayed at the end of a turn, regardless if the stopBtn was pressed or the ‘X’ was hit.
Any of this code, that appeared elsewhere I removed so that I wouldn't be duplicating myself. In the numberChange function, I added a new IF statement around the already existing IF statement to create a nested IF. The original IF remains the same (with the removal of the && stringsArray != “X” however, the ELSE part now only contains the line of code:
else{ endOfTurn() }
The new IF statement surrounding the original IF has the following condition, checking to see if we have reached ‘X’ or not:
if stringsArray[count] != "X"
IF we have not reached ‘X’, then it runs the original IF statement, if we have reached ‘X’ it runs the ELSE part, which simply prints out the ‘X’ then also runs the endOfTurn function. You can see the new stopBtn and numberChange function code below.
After these changes, everything seems to be running smoothly.