WEBVTT 00:00:06.730 --> 00:00:12.540 In this video we are going to go through the logic of our game so that we can get ready to build the 00:00:12.540 --> 00:00:14.180 structure of our character. 00:00:14.580 --> 00:00:20.430 So first of all to start the game we need to click on the stars and that's our stars. 00:00:20.430 --> 00:00:26.700 Musson is sometimes a reset button and that depends on whether we are already playing or not. 00:00:27.210 --> 00:00:31.180 So the question to ask once we click on the button is are we playing. 00:00:31.770 --> 00:00:37.370 If yes like here we are going to reload the page. 00:00:37.590 --> 00:00:38.870 All right. 00:00:38.940 --> 00:00:45.880 Otherwise if we are not playing and we click on the button we are going to initiate the game and there 00:00:45.880 --> 00:00:48.250 will be a few actions taken. 00:00:48.300 --> 00:00:53.500 So we are going to generate a new question and multiple answers. 00:00:53.580 --> 00:01:03.150 Also we are going to change the text to reset game and we are going to show the count down box and start 00:01:03.150 --> 00:01:06.780 reducing the time by 1 every second. 00:01:07.200 --> 00:01:12.940 So we can reduce by 1 second and then we are going to check do we have any time left. 00:01:13.650 --> 00:01:19.470 If yes we can to reduce that slightly by another second and then after a second we're going to ask the 00:01:19.470 --> 00:01:20.710 same question again. 00:01:21.450 --> 00:01:24.520 And we carry on like that until we get zero or second there. 00:01:24.690 --> 00:01:26.940 And then the the answer is going to be No. 00:01:27.210 --> 00:01:32.540 And then we are going to show the game over message just like this. 00:01:32.610 --> 00:01:38.090 And also we change the text to start the game. 00:01:39.840 --> 00:01:43.740 Another sequence to look at is when we click on an answer box. 00:01:43.860 --> 00:01:48.470 So we going to need to ask the same question Are we playing. 00:01:48.900 --> 00:01:55.320 Because if we're not playing and we click on any of these the boxes there will be no action to be taken 00:01:55.330 --> 00:01:55.940 . 00:01:56.790 --> 00:02:03.420 Otherwise if we are playing then we are going to ask the question is the answer correct or not. 00:02:03.900 --> 00:02:04.850 If is correct. 00:02:05.010 --> 00:02:08.200 We are going to increase the score by 1. 00:02:08.850 --> 00:02:16.890 And also we are going to show the correct books for one second and we will generate a new question and 00:02:16.890 --> 00:02:18.880 multiple answers. 00:02:19.170 --> 00:02:23.710 By the way the highlighted Bosnia is the bus and we use to answer the previous question. 00:02:23.920 --> 00:02:25.980 OK. 00:02:27.120 --> 00:02:36.260 If the answer is wrong then we are going to show the try again box for one second. 00:02:39.240 --> 00:02:39.810 All right. 00:02:39.810 --> 00:02:44.170 Now as we have done the heart beats which is understanding the logic of our game. 00:02:44.310 --> 00:02:48.300 All we need to do now is translate this into javascript code