Whatever begins, also ends.
— Seneca
(Seneca obviously didn’t know about getting your loop condition wrong … — mik)
Today, we are introducing a new concept: loops. Or, if you want to know more precisely: the while loop.
But, as always, we’re not doing this by just talking about the theory in a vacuum – we actually need it to progress with one of our projects, the Breakout game that we have seen before.
Loops are a concept fundamental to all programming, so if you are a learner, pay close attention. You will need this again later!
Concepts discussed: loops, while loop
hey mik
thx for the excelent videos, I understand greenfoot a much better by your great videos
Thanks again sir!
Your contributions to Java and students like myself are invaluable!!!
Fantastic series and teachings. Greenfoot has come alive for me with these series.
Thank You!
Great videos, Mik. You covered a lot of important stuff, and as usual, you made it clear and fun. It took me a while to get to these two new vids ’cause the two before scared me; the casting issues befuddled me.
It looks like you will be covering MY question next, which is obstacles( the paddles ). My game is in a room that looks 3D. The player can walk through , but not on the walls and furniture.
Keep up the great work. In my Java class, everybody loves your shows.
I saw that some people do this with arrays as in maze games.
Thank you again for this great lessons.
Thank you
hmm, mik is building tension before his next post, here is a little ascii chart showing number of days between JoC episodes starting from episode 8 till 30 (teacher commentary included), 47 days from his last post is a record
darek
1 #
4 ####
2 ##
1 #
2 ##
1 #
1 #
17 #################
7 #######
21 #####################
2 ##
3 ###
1 #
1 #
0
3 ###
5 #####
5 #####
1 #
8 ########
0
18 ##################
6 ######
47 ###############################################
🙂
I like it.
Thanks for the reminder – that’ll really kick me into action to put another post out son now!
mik
I’m an Iranian, is a beautiful site to site, I’ll forget to change the object
Wow, this brings back a lot of memories from Brighton Uni.
Love the series – and its very useful. I did a Java course but this is great way to keep improving.
One question though … why the while loop? Wouldn’t the for loop be a more … typical loop for this? Kind of like with 2D arrays you use a nested for loop to go through them. (As you might have guessed I started with c++. 😀 )
Broken link http://blogs.kent.ac.uk/mik/2012/03/joc-24/