File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ function App() {
41
41
}
42
42
function addPointsFromClick ( ) {
43
43
//add points from clicking a button
44
+ updateClickers ( ) ; //update clickers value
44
45
setPoints ( points + clickMultiplier ) ; //increase points by 1 when button clicked
45
46
setClicks ( clicks + 1 ) ; //increase clicks made by 1
46
47
}
@@ -49,15 +50,15 @@ function App() {
49
50
if ( checkPointsForUpgrade ( points , 10 * Math . pow ( 2 , clickers - 1 ) ) ) {
50
51
setPoints ( points - 10 * Math . pow ( 2 , clickers - 1 ) ) ; //spend points
51
52
setClickers ( clickers + 1 ) ; //increase clickers by 1
52
- updateClickers ( ) ;
53
+ updateClickers ( ) ; //update clickers value
53
54
}
54
55
}
55
56
function upgradePointsPerSecond ( ) {
56
57
//upgrade points per second
57
- if ( checkPointsForUpgrade ( points , 10 * Math . pow ( 2 , pointsPerSecond ) ) ) {
58
- setPoints ( points - 10 * Math . pow ( 2 , pointsPerSecond ) ) ;
58
+ if ( checkPointsForUpgrade ( points , 10 * Math . pow ( 2 , autoClickers ) ) ) {
59
+ setPoints ( points - 10 * Math . pow ( 2 , autoClickers ) ) ;
59
60
setAutoClickers ( autoClickers + 1 ) ; //increase autoclickers by 1
60
- updateAutoClickers ( ) ;
61
+ updateAutoClickers ( ) ; //update auto clickers value
61
62
}
62
63
}
63
64
return (
You can’t perform that action at this time.
0 commit comments