File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class _HomepageState extends State<Homepage> {
2929 backgroundColor: Colors .brown,
3030 title: const Text ('Game Over' , style: TextStyle (color: Colors .white)),
3131 content: Text (
32- 'Your bird has fallen!\n Score: $score ' ,
32+ 'Your bird has fallen!\n Score: $score ' ,//display the score when game is over
3333 style: const TextStyle (color: Colors .white),
3434 ),
3535 actions: [
@@ -61,7 +61,7 @@ class _HomepageState extends State<Homepage> {
6161 barrierx1 -= 0.05 ;
6262 barrierx2 -= 0.05 ;
6363
64- // Reposition barriers and increase score
64+ // Reposition barriers and score incremented by 1 for each barrier passed
6565 if (barrierx1 < - 1.5 ) {
6666 barrierx1 = 1.5 ;
6767 score++ ;
@@ -157,6 +157,7 @@ class _HomepageState extends State<Homepage> {
157157 style: const TextStyle (color: Colors .white),
158158 ),
159159 ),
160+ //score board implemented
160161 if (isGameStarted)
161162 Container (
162163 alignment: const Alignment (- 0.8 , - 0.8 ),
You can’t perform that action at this time.
0 commit comments