title
Java Video Tutorial 8

description
Code is Here: http://goo.gl/Ic9sk How to Install Java Libraries: http://goo.gl/Dqco3 Best Java Book : http://goo.gl/FtKp0m I thought it would be fun to teach Java while I make a video game. This is a simple game, but it will teach a lot of the logic needed to make your own game. This tutorial will teach you about arrays, class fields, class methods, how to set a default value for an array, and a ton of logic.

detail
{'title': 'Java Video Tutorial 8', 'heatmap': [{'end': 217.681, 'start': 200.669, 'weight': 0.749}, {'end': 653.42, 'start': 608.56, 'weight': 0.789}, {'end': 1007.032, 'start': 978.447, 'weight': 0.896}, {'end': 1057.034, 'start': 1022.606, 'weight': 0.926}], 'summary': 'In the 《java video tutorial 8》, the chapters cover creating a simplistic video game in java using multidimensional arrays, populating the game board with stars, drawing game and battle boards, setting up battle board and monster positioning, and executing methods in a class while creating arrays for temporary battleboard container and storing monster objects.', 'chapters': [{'end': 107.329, 'segs': [{'end': 45.904, 'src': 'embed', 'start': 16.502, 'weight': 1, 'content': [{'end': 20.585, 'text': 'Well, there is an immense amount of logic in creating a video game.', 'start': 16.502, 'duration': 4.083}, {'end': 22.867, 'text': "So in this tutorial, I'm going to continue from part seven.", 'start': 20.605, 'duration': 2.262}, {'end': 24.208, 'text': "If you didn't watch it, definitely watch it.", 'start': 22.907, 'duration': 1.301}, {'end': 28.912, 'text': "And we're going to make ourself a very simplistic video game, but we're going to learn a lot of things along the way.", 'start': 24.508, 'duration': 4.404}, {'end': 32.594, 'text': "Now, if you don't catch everything as I go through this tutorial, don't worry about it.", 'start': 29.092, 'duration': 3.502}, {'end': 39.94, 'text': "Because based off your comments below, I'm going to go and expand and explain anything else that you do not understand here.", 'start': 32.774, 'duration': 7.166}, {'end': 41.461, 'text': "We're going to be jumping right into it.", 'start': 40.12, 'duration': 1.341}, {'end': 45.904, 'text': 'This is basically what our game board is going to look like, what you see right here on the screen,', 'start': 41.541, 'duration': 4.363}], 'summary': 'Creating a simplistic video game tutorial with expansion and explanation based on comments.', 'duration': 29.402, 'max_score': 16.502, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU16502.jpg'}, {'end': 89.443, 'src': 'embed', 'start': 51.888, 'weight': 0, 'content': [{'end': 55.771, 'text': "they are going to attack each other and eventually kill each other until there's only one left.", 'start': 51.888, 'duration': 3.883}, {'end': 58.332, 'text': 'Alright, so just basic, this is the idea.', 'start': 56.071, 'duration': 2.261}, {'end': 61.113, 'text': "And what you're looking at here is really an array.", 'start': 58.492, 'duration': 2.621}, {'end': 64.494, 'text': 'An array is just a bunch of boxes.', 'start': 61.333, 'duration': 3.161}, {'end': 71.317, 'text': 'And this specifically is called a multidimensional array because this would be considered just a regular array.', 'start': 64.694, 'duration': 6.623}, {'end': 78.719, 'text': 'And because there are multiple groupings, or this is a two-dimensional array, we call this a multidimensional array.', 'start': 71.657, 'duration': 7.062}, {'end': 80.04, 'text': "And I'm going to show you how to make those.", 'start': 78.739, 'duration': 1.301}, {'end': 81.88, 'text': "I'm going to show you how to import new libraries.", 'start': 80.06, 'duration': 1.82}, {'end': 83.521, 'text': "We're going to do tons of things in this tutorial.", 'start': 81.9, 'duration': 1.621}, {'end': 87.462, 'text': "So what we're going to do right now is we're going to jump over into our monster.java file.", 'start': 83.541, 'duration': 3.921}, {'end': 89.443, 'text': "And I'm going to rename this monster2.", 'start': 87.722, 'duration': 1.721}], 'summary': 'Tutorial on multidimensional arrays and importing libraries in java.', 'duration': 37.555, 'max_score': 51.888, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU51888.jpg'}], 'start': 0.114, 'title': 'Creating a simplistic video game in java', 'summary': 'Focuses on using a multidimensional array to represent the game board and creating monsters that move, attack, and eventually kill each other in java.', 'chapters': [{'end': 107.329, 'start': 0.114, 'title': 'Creating a simplistic video game in java', 'summary': 'Discusses creating a simplistic video game in java, using a multidimensional array to represent the game board and creating monsters that move, attack, and eventually kill each other.', 'duration': 107.215, 'highlights': ['The tutorial series is focused on creating a simplistic video game in Java, involving an immense amount of logic and learning opportunities.', 'A multidimensional array is used to represent the game board, with the goal of creating and moving monsters that can attack and eliminate each other.', 'The process involves importing new libraries, renaming objects, and making various modifications in the monster.java file to achieve the desired functionalities.', 'The tutorial aims to provide explanations for any components that may not be immediately understood, based on feedback from the audience.', 'The tutorial encourages viewers to watch the previous part (part seven) and assures them that further explanations will be provided for any concepts they may find challenging.']}], 'duration': 107.215, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU114.jpg', 'highlights': ['A multidimensional array is used to represent the game board, with the goal of creating and moving monsters that can attack and eliminate each other.', 'The tutorial series is focused on creating a simplistic video game in Java, involving an immense amount of logic and learning opportunities.', 'The process involves importing new libraries, renaming objects, and making various modifications in the monster.java file to achieve the desired functionalities.', 'The tutorial encourages viewers to watch the previous part (part seven) and assures them that further explanations will be provided for any concepts they may find challenging.', 'The tutorial aims to provide explanations for any components that may not be immediately understood, based on feedback from the audience.']}, {'end': 274.377, 'segs': [{'end': 156.408, 'src': 'embed', 'start': 129.077, 'weight': 0, 'content': [{'end': 132.258, 'text': "And we're going to jump down inside here, and I'm going to start building some stuff.", 'start': 129.077, 'duration': 3.181}, {'end': 136.4, 'text': 'So the very first thing I want to do is I want to create our multidimensional array.', 'start': 132.518, 'duration': 3.882}, {'end': 140.301, 'text': "And how you do that, I'm going to make it static character multidimensional.", 'start': 136.52, 'duration': 3.781}, {'end': 142.042, 'text': "It's going to be a 2D array.", 'start': 140.361, 'duration': 1.681}, {'end': 145.163, 'text': 'So put two of those little guys inside of there, two little brackets.', 'start': 142.122, 'duration': 3.041}, {'end': 147.204, 'text': "And I'm going to call it Battleboard.", 'start': 145.684, 'duration': 1.52}, {'end': 150.766, 'text': 'And you go equals and new and character.', 'start': 147.544, 'duration': 3.222}, {'end': 151.966, 'text': 'And then this is very important.', 'start': 150.906, 'duration': 1.06}, {'end': 154.687, 'text': 'You have to define how big your array is going to be.', 'start': 151.986, 'duration': 2.701}, {'end': 156.408, 'text': "And mine's going to be 10 by 10.", 'start': 154.827, 'duration': 1.581}], 'summary': 'Creating a 2d static character array called battleboard with dimensions 10x10.', 'duration': 27.331, 'max_score': 129.077, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU129077.jpg'}, {'end': 223.789, 'src': 'heatmap', 'start': 200.669, 'weight': 0.749, 'content': [{'end': 208.394, 'text': 'And then row is going to represent a temporary holding cell for all of the stars before they get put into the array.', 'start': 200.669, 'duration': 7.725}, {'end': 209.494, 'text': "So that's all that does.", 'start': 208.554, 'duration': 0.94}, {'end': 213.296, 'text': 'And then we need to define what is the name of our array.', 'start': 209.854, 'duration': 3.442}, {'end': 215.158, 'text': 'So battleboard There it is.', 'start': 213.476, 'duration': 1.682}, {'end': 217.681, 'text': "We created our array, and here we're going to populate our arrays.", 'start': 215.198, 'duration': 2.483}, {'end': 219.784, 'text': 'This is going to represent the individual cells.', 'start': 217.841, 'duration': 1.943}, {'end': 223.789, 'text': 'This is going to represent the individual stars that are going to go into these cells.', 'start': 219.824, 'duration': 3.965}], 'summary': "Creating a temporary holding cell for stars before putting them into an array, named 'battleboard', and populating the array.", 'duration': 23.12, 'max_score': 200.669, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU200669.jpg'}, {'end': 248.754, 'src': 'embed', 'start': 219.824, 'weight': 1, 'content': [{'end': 223.789, 'text': 'This is going to represent the individual stars that are going to go into these cells.', 'start': 219.824, 'duration': 3.965}, {'end': 225.571, 'text': 'And this is the array itself.', 'start': 223.929, 'duration': 1.642}, {'end': 229.576, 'text': "If you don't quite get it, we're definitely going to get into a lot more detail about arrays as we go on.", 'start': 225.591, 'duration': 3.985}, {'end': 232.539, 'text': 'Well then, this is why we needed the arrays library.', 'start': 229.676, 'duration': 2.863}, {'end': 234.881, 'text': "I'm going to go arrays, and I'm going to go fill.", 'start': 232.639, 'duration': 2.242}, {'end': 236.222, 'text': "I'm going to call a fill method.", 'start': 234.901, 'duration': 1.321}, {'end': 243.449, 'text': "And I'm going to say, okay, row, which represents one of the individual little boxes that we want to put something in, put that inside of there.", 'start': 236.442, 'duration': 7.007}, {'end': 248.754, 'text': 'And then here where it says arg1 on my screen, I want to say what I want to be thrown in there.', 'start': 243.669, 'duration': 5.085}], 'summary': 'Introduction to arrays and fill method for populating cells.', 'duration': 28.93, 'max_score': 219.824, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU219824.jpg'}, {'end': 284.142, 'src': 'embed', 'start': 255.363, 'weight': 2, 'content': [{'end': 256.944, 'text': 'Real nice and neat and pretty cool.', 'start': 255.363, 'duration': 1.581}, {'end': 258.406, 'text': 'So what else are we going to need to do??', 'start': 257.005, 'duration': 1.401}, {'end': 264.033, 'text': 'Well, after we go and we put all these stars inside of there, we might want to do something like redraw the board.', 'start': 258.505, 'duration': 5.528}, {'end': 267.938, 'text': "So I'm going to create another public method that's not going to return anything.", 'start': 264.374, 'duration': 3.564}, {'end': 271.296, 'text': "And I'm going to just call it Redraw Board, right like that.", 'start': 268.354, 'duration': 2.942}, {'end': 274.377, 'text': 'And it is going to do exactly what it says.', 'start': 271.676, 'duration': 2.701}, {'end': 277.099, 'text': "It's going to redraw the game board on the screen.", 'start': 274.437, 'duration': 2.662}, {'end': 278.739, 'text': 'So, you know, nothing that complicated.', 'start': 277.119, 'duration': 1.62}, {'end': 284.142, 'text': "So what are we going to do? We're going to create a temporary variable or field or whatever you want to call it called K.", 'start': 278.819, 'duration': 5.323}], 'summary': 'The transcript discusses creating a method to redraw the game board.', 'duration': 28.779, 'max_score': 255.363, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU255363.jpg'}], 'start': 107.489, 'title': 'Creating game board and populating with stars', 'summary': 'Covers the creation of a game board using a multidimensional array, populating it with stars, and utilizing java.util.arrays library for filling the array with stars. it also emphasizes the need to redraw the board.', 'chapters': [{'end': 274.377, 'start': 107.489, 'title': 'Creating game board and populating with stars', 'summary': 'Discusses the creation of a game board using a multidimensional array and populating it with stars. it also covers the use of the java.util.arrays library for filling the array with stars and the need to redraw the board.', 'duration': 166.888, 'highlights': ['Creation of a multidimensional array for the game board The speaker explains the process of creating a static character multidimensional 2D array named Battleboard with dimensions 10 by 10.', "Populating the array with stars using the java.util.arrays library The speaker demonstrates the use of the arrays library's fill method to populate the array with stars, ensuring every cell in the array contains a star.", 'Importance of redrawing the board after populating it The need to create a public method for redrawing the board is emphasized as a necessary step after populating the array with stars.']}], 'duration': 166.888, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU107489.jpg', 'highlights': ['Creation of a static character multidimensional 2D array named Battleboard with dimensions 10 by 10', "Demonstrates the use of the arrays library's fill method to populate the array with stars", 'Emphasizes the need to create a public method for redrawing the board after populating it']}, {'end': 665.843, 'segs': [{'end': 367.1, 'src': 'embed', 'start': 326.448, 'weight': 0, 'content': [{'end': 329.389, 'text': "You know, like I said, I'm just sort of guessing my way through this tutorial.", 'start': 326.448, 'duration': 2.941}, {'end': 330.269, 'text': 'Hopefully it works out well.', 'start': 329.489, 'duration': 0.78}, {'end': 330.909, 'text': "I'm sure it will.", 'start': 330.289, 'duration': 0.62}, {'end': 332.07, 'text': "Otherwise, I'll redo it.", 'start': 331.27, 'duration': 0.8}, {'end': 338.732, 'text': 'And then what do I need to do? Well, I need to cycle through the array and put all the little stars as well as the dashes.', 'start': 332.35, 'duration': 6.382}, {'end': 342.493, 'text': 'So this is basically going to draw all this stuff right here.', 'start': 338.832, 'duration': 3.661}, {'end': 343.413, 'text': "It's going to draw all this.", 'start': 342.533, 'duration': 0.88}, {'end': 345.634, 'text': 'So I need to draw all that out onto the screen.', 'start': 343.693, 'duration': 1.941}, {'end': 346.834, 'text': "So I'm going to use a for loop.", 'start': 345.654, 'duration': 1.18}, {'end': 350.976, 'text': "Int i is equal to, and then I'm going to say 0.", 'start': 347.054, 'duration': 3.922}, {'end': 354.637, 'text': 'i, well, i is less than battleboard.link.', 'start': 350.976, 'duration': 3.661}, {'end': 358.412, 'text': 'And this is how you get the size of your battle board.', 'start': 355.489, 'duration': 2.923}, {'end': 361.295, 'text': "Now you know from up here it's 10 by 10.", 'start': 358.712, 'duration': 2.583}, {'end': 362.276, 'text': "So that's what this does.", 'start': 361.295, 'duration': 0.981}, {'end': 367.1, 'text': 'Battle board length is going to return the length of the battle board.', 'start': 362.496, 'duration': 4.604}], 'summary': 'Tutorial on drawing stars and dashes onto a 10x10 battle board.', 'duration': 40.652, 'max_score': 326.448, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU326448.jpg'}, {'end': 653.42, 'src': 'heatmap', 'start': 608.56, 'weight': 0.789, 'content': [{'end': 610.961, 'text': 'And temporarily or currently there are no monsters.', 'start': 608.56, 'duration': 2.401}, {'end': 612.021, 'text': "So we're going to leave it that way.", 'start': 610.981, 'duration': 1.04}, {'end': 615.622, 'text': "And what's something else that I probably want to do here.", 'start': 612.501, 'duration': 3.121}, {'end': 618.984, 'text': 'I want to find out if this monster is alive at all times.', 'start': 615.662, 'duration': 3.322}, {'end': 621.485, 'text': "And for some god awful reason I didn't do that before.", 'start': 619.104, 'duration': 2.381}, {'end': 625.366, 'text': "So let's provide a way to be able to find out if our monster is alive or not.", 'start': 621.585, 'duration': 3.781}, {'end': 627.967, 'text': "And we're just going to copy this because it's the basic sort of style.", 'start': 625.386, 'duration': 2.581}, {'end': 630.288, 'text': "And we're just going to call this get alive.", 'start': 628.467, 'duration': 1.821}, {'end': 633.689, 'text': "And it's just going to return whether the monster is alive or not.", 'start': 630.768, 'duration': 2.921}, {'end': 640.189, 'text': 'Then I need to make some changes down here to my constructor for my little monster objects.', 'start': 634.164, 'duration': 6.025}, {'end': 644.573, 'text': "So let's just scroll down inside of here and figure out what sort of changes I want to make.", 'start': 640.569, 'duration': 4.004}, {'end': 652.439, 'text': "And one of the changes that I think I really want to make is I want to be able to pass a string that's going to contain the name for the monster.", 'start': 645.113, 'duration': 7.326}, {'end': 653.42, 'text': "So let's do that.", 'start': 652.519, 'duration': 0.901}], 'summary': 'Adding functionality to check if monster is alive and providing name input.', 'duration': 44.86, 'max_score': 608.56, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU608560.jpg'}, {'end': 661.259, 'src': 'embed', 'start': 630.768, 'weight': 2, 'content': [{'end': 633.689, 'text': "And it's just going to return whether the monster is alive or not.", 'start': 630.768, 'duration': 2.921}, {'end': 640.189, 'text': 'Then I need to make some changes down here to my constructor for my little monster objects.', 'start': 634.164, 'duration': 6.025}, {'end': 644.573, 'text': "So let's just scroll down inside of here and figure out what sort of changes I want to make.", 'start': 640.569, 'duration': 4.004}, {'end': 652.439, 'text': "And one of the changes that I think I really want to make is I want to be able to pass a string that's going to contain the name for the monster.", 'start': 645.113, 'duration': 7.326}, {'end': 653.42, 'text': "So let's do that.", 'start': 652.519, 'duration': 0.901}, {'end': 654.02, 'text': 'There you are.', 'start': 653.56, 'duration': 0.46}, {'end': 654.601, 'text': 'String name.', 'start': 654.08, 'duration': 0.521}, {'end': 661.259, 'text': "So then what am I also going to do? I'm going to go this, name, and this is a reference to the object that we're working with right now.", 'start': 655.034, 'duration': 6.225}], 'summary': 'Updating constructor to include a name parameter for monster objects.', 'duration': 30.491, 'max_score': 630.768, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU630768.jpg'}], 'start': 274.437, 'title': 'Drawing game board and creating battle board', 'summary': 'Covers drawing a game board with dashes and stars using a while loop, and creating a battle board with for loops, accessing elements with indexes, and modifying public fields for a monster class.', 'chapters': [{'end': 343.413, 'start': 274.437, 'title': 'Drawing game board with dashes and stars', 'summary': 'Explains how to draw a game board on the screen using a while loop to print 30 dashes on one line and then cycling through an array to draw stars and dashes.', 'duration': 68.976, 'highlights': ['The chapter explains how to draw a game board on the screen using a while loop to print 30 dashes on one line and then cycling through an array to draw stars and dashes.', 'Using a while loop to print 30 dashes on one line.', 'Cycling through an array to draw stars and dashes.']}, {'end': 665.843, 'start': 343.693, 'title': 'Creating battle board and monster fields', 'summary': 'Explains how to create a battle board using for loops, accessing elements using indexes, and modifying public fields and constructors for a monster class.', 'duration': 322.15, 'highlights': ['Using a for loop to draw the battle board and accessing its size using battle board length.', 'Explaining the use of indexes i and j to target individual elements within an array and determining the length of each column.', 'Modifying public fields and constructor for the monster class to track the number of monsters, check if a monster is alive, and pass a name for the monster.']}], 'duration': 391.406, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU274437.jpg', 'highlights': ['Covers drawing a game board with dashes and stars using a while loop and cycling through an array.', 'Using a for loop to draw the battle board and accessing its size using battle board length.', 'Modifying public fields and constructor for the monster class to track the number of monsters, check if a monster is alive, and pass a name for the monster.']}, {'end': 1040.651, 'segs': [{'end': 731.863, 'src': 'embed', 'start': 688.339, 'weight': 0, 'content': [{'end': 689.821, 'text': 'E-O-R-D Battleboard.', 'start': 688.339, 'duration': 1.482}, {'end': 690.742, 'text': 'And then Length.', 'start': 690.041, 'duration': 0.701}, {'end': 693.944, 'text': "I'll again, and then I'm going to say minus 1.", 'start': 691.302, 'duration': 2.642}, {'end': 694.884, 'text': 'And why did I do that?', 'start': 693.944, 'duration': 0.94}, {'end': 698.687, 'text': 'The reason why I did is, whenever you create an array, this is 0, 0, remember?', 'start': 694.945, 'duration': 3.742}, {'end': 703.93, 'text': "So that means, if it's going to give me a total length which is equal to 10, well, this is 0..", 'start': 698.807, 'duration': 5.123}, {'end': 709.628, 'text': 'This is 1, 2, 3, 4, 5, 6, 7, 8, 9.', 'start': 703.93, 'duration': 5.698}, {'end': 712.015, 'text': "So when it kicks back 10, it's going to be wrong.", 'start': 709.634, 'duration': 2.381}, {'end': 716.018, 'text': "Because if I try to put it in space 10 on my battle board, well, space 10 doesn't exist.", 'start': 712.095, 'duration': 3.923}, {'end': 718.239, 'text': "So that's the reason why I'm knocking 1 off of there.", 'start': 716.158, 'duration': 2.081}, {'end': 722.847, 'text': 'Well, then I also want to get my maximum space for all of my columns.', 'start': 718.399, 'duration': 4.448}, {'end': 724.31, 'text': 'Just type that in there.', 'start': 723.388, 'duration': 0.922}, {'end': 725.552, 'text': 'Change this to Y.', 'start': 724.73, 'duration': 0.822}, {'end': 728.277, 'text': "I'm going to go in here and type in 0.", 'start': 725.552, 'duration': 2.725}, {'end': 731.863, 'text': 'And then this is going to give me the maximum space in the column, which is going to kick back.', 'start': 728.277, 'duration': 3.586}], 'summary': 'Adjust array length by subtracting 1 to avoid out-of-bounds error.', 'duration': 43.524, 'max_score': 688.339, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU688339.jpg'}, {'end': 790.106, 'src': 'embed', 'start': 749.748, 'weight': 3, 'content': [{'end': 755.371, 'text': "So that's the reason why I'm trying to get that length because I don't want the monster to accidentally fall off of my battle board.", 'start': 749.748, 'duration': 5.623}, {'end': 756.832, 'text': 'What else do I need from a monster?', 'start': 755.451, 'duration': 1.381}, {'end': 759.933, 'text': "Well, I'm going to need a random number generated thing.", 'start': 756.872, 'duration': 3.061}, {'end': 761.254, 'text': "that's going to be like where are?", 'start': 759.933, 'duration': 1.321}, {'end': 763.857, 'text': 'The monster begins whenever everything starts out.', 'start': 761.616, 'duration': 2.241}, {'end': 767.557, 'text': "So I'm going to go random num x and random num y.", 'start': 763.917, 'duration': 3.64}, {'end': 769.698, 'text': 'Both integers are just going to tell me where to start.', 'start': 767.557, 'duration': 2.141}, {'end': 775.779, 'text': 'And then I want to use a do loop to generate my random space for my monster.', 'start': 770.218, 'duration': 5.561}, {'end': 783.681, 'text': "And I'm using a do loop in this situation instead of a while loop because I always want to define a space for the monster no matter what.", 'start': 775.959, 'duration': 7.722}, {'end': 787.402, 'text': 'A lot of people have asked for an example of why you would ever need a do loop.', 'start': 783.701, 'duration': 3.701}, {'end': 788.282, 'text': "Well, here's one.", 'start': 787.442, 'duration': 0.84}, {'end': 790.106, 'text': "So let's go random.", 'start': 788.726, 'duration': 1.38}], 'summary': 'Need a random number generator for positioning the monster on the battle board.', 'duration': 40.358, 'max_score': 749.748, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU749748.jpg'}, {'end': 865.193, 'src': 'embed', 'start': 836.625, 'weight': 4, 'content': [{'end': 839.686, 'text': 'So this is the new location where the monster may be located.', 'start': 836.625, 'duration': 3.061}, {'end': 842.647, 'text': "And we're going to say while it's not equal to.", 'start': 840.146, 'duration': 2.501}, {'end': 846.36, 'text': "Star, I'm going to continue to generate these guys.", 'start': 843.257, 'duration': 3.103}, {'end': 850.985, 'text': "So if there's a B there or whatever, I'm going to say, uh-uh, this isn't a star.", 'start': 846.741, 'duration': 4.244}, {'end': 856.991, 'text': "We need to generate a new XY position for our monster, because we don't want to start dropping monsters on top of other monsters,", 'start': 851.205, 'duration': 5.786}, {'end': 858.313, 'text': 'especially when the game starts out.', 'start': 856.991, 'duration': 1.322}, {'end': 863.458, 'text': 'And then what are we going to do? We need to assign an X and Y position to the object that we had before.', 'start': 858.353, 'duration': 5.105}, {'end': 865.193, 'text': 'So we had these guys.', 'start': 864.013, 'duration': 1.18}], 'summary': 'Generating new xy position for monster to prevent overlap in game.', 'duration': 28.568, 'max_score': 836.625, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU836625.jpg'}, {'end': 900.211, 'src': 'embed', 'start': 871.335, 'weight': 2, 'content': [{'end': 876.797, 'text': 'Well, we want to assign them after we go through the do loop and we realize okay, we found a position for our monster.', 'start': 871.335, 'duration': 5.462}, {'end': 877.677, 'text': "Now let's assign it.", 'start': 876.817, 'duration': 0.86}, {'end': 886.16, 'text': "So we can go this, x position is equal to, and then it's going to be what? Random x, because we found out that random x works.", 'start': 877.797, 'duration': 8.363}, {'end': 892.864, 'text': 'And then we also want to go in here, this, and generate the Y position, or assign the Y position.', 'start': 886.417, 'duration': 6.447}, {'end': 900.211, 'text': "And then remember before, whenever I said I was going to get the first initial from whatever the monster's name is and assign it to nameCharacter1,,", 'start': 893.024, 'duration': 7.187}], 'summary': 'Assign x and y positions for monster using do loop and random values.', 'duration': 28.876, 'max_score': 871.335, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU871335.jpg'}, {'end': 1007.032, 'src': 'heatmap', 'start': 978.447, 'weight': 0.896, 'content': [{'end': 984.192, 'text': 'And then we probably also want to go number of monsters so that we can track how many monsters there are.', 'start': 978.447, 'duration': 5.745}, {'end': 987.976, 'text': "Well, we know that if we ran through this constructor, there's now one new monster.", 'start': 984.252, 'duration': 3.724}, {'end': 991.139, 'text': "And let me see if there's anything else I want to do here.", 'start': 988.997, 'duration': 2.142}, {'end': 996.535, 'text': 'I want to increment the number of monsters if this basic constructor is called.', 'start': 991.812, 'duration': 4.723}, {'end': 998.637, 'text': "So let's File, Save, and let's see how we're doing.", 'start': 996.636, 'duration': 2.001}, {'end': 1002.708, 'text': "Okay, so we're back over in lesson8.java.", 'start': 999.065, 'duration': 3.643}, {'end': 1007.032, 'text': "And what are we going to do here? Well, I know that I'm going to need this array function.", 'start': 1003.089, 'duration': 3.943}], 'summary': 'Tracking number of monsters, incrementing count in constructor for lesson8.java.', 'duration': 28.585, 'max_score': 978.447, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU978447.jpg'}], 'start': 666.123, 'title': 'Battle board setup and monster positioning', 'summary': 'Explains the process of defining the x and y coordinates for a battle board, while also discussing the algorithm for positioning monsters using random number generation and tracking the number of monsters created.', 'chapters': [{'end': 749.747, 'start': 666.123, 'title': 'Defining x and y for battle board', 'summary': 'Explains the process of defining the x and y coordinates for a battle board, adjusting for array indexing and providing an example, with a maximum space of 9x9.', 'duration': 83.624, 'highlights': ['The maximum number of spaces horizontally for the battle board is determined by using the formula Length - 1 to account for array indexing, resulting in a maximum space of 9 horizontally.', 'The maximum space for all columns is obtained by using a similar approach, resulting in a maximum space of 9 vertically.']}, {'end': 1040.651, 'start': 749.748, 'title': 'Monster positioning algorithm', 'summary': 'Discusses the algorithm for positioning monsters on a battle board using random number generation and do loops, ensuring they are placed on spaces with star representation and tracking the number of monsters created.', 'duration': 290.903, 'highlights': ['The algorithm uses random number generation for both X and Y positions to define the starting location of the monster, ensuring it does not accidentally fall off the battle board.', 'A do loop is employed instead of a while loop to consistently define a space for the monster, showcasing a practical application of the do loop concept.', 'The positioning algorithm utilizes the condition of only allowing monsters to occupy spaces with a star representation, ensuring they are not placed on top of each other.', 'The algorithm assigns the X and Y positions to the monster object after finding a suitable location, and tracks the number of monsters created using a basic constructor.']}], 'duration': 374.528, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU666123.jpg', 'highlights': ['The maximum space for all columns is obtained by using a similar approach, resulting in a maximum space of 9 vertically.', 'The maximum number of spaces horizontally for the battle board is determined by using the formula Length - 1 to account for array indexing, resulting in a maximum space of 9 horizontally.', 'The algorithm assigns the X and Y positions to the monster object after finding a suitable location, and tracks the number of monsters created using a basic constructor.', 'The algorithm uses random number generation for both X and Y positions to define the starting location of the monster, ensuring it does not accidentally fall off the battle board.', 'The positioning algorithm utilizes the condition of only allowing monsters to occupy spaces with a star representation, ensuring they are not placed on top of each other.', 'A do loop is employed instead of a while loop to consistently define a space for the monster, showcasing a practical application of the do loop concept.']}, {'end': 1270.256, 'segs': [{'end': 1123.598, 'src': 'embed', 'start': 1061.55, 'weight': 0, 'content': [{'end': 1066.532, 'text': 'And this provides us the ability to call that method that we created over in Monster2.', 'start': 1061.55, 'duration': 4.982}, {'end': 1067.612, 'text': 'See? Right here.', 'start': 1066.812, 'duration': 0.8}, {'end': 1068.593, 'text': 'Build BattleBoard.', 'start': 1067.813, 'duration': 0.78}, {'end': 1077.476, 'text': 'So if we want to call or execute a method inside of the class Monster2, all we have to do is put Monster2 dot and then build BattleBoard.', 'start': 1068.813, 'duration': 8.663}, {'end': 1080.018, 'text': "And that's going to create our BattleBoard for us.", 'start': 1077.777, 'duration': 2.241}, {'end': 1080.998, 'text': "See? That's all we need to do.", 'start': 1080.078, 'duration': 0.92}, {'end': 1082.999, 'text': "That's why object-oriented programming is so awesome.", 'start': 1081.038, 'duration': 1.961}, {'end': 1088.401, 'text': 'Because you build all the tools in the background and then it becomes like this easy way of just creating everything else.', 'start': 1083.019, 'duration': 5.382}, {'end': 1093.113, 'text': "Well, let's go and create a temporary BattleBoard container as well.", 'start': 1088.769, 'duration': 4.344}, {'end': 1097.358, 'text': 'And how you do that is just temp BattleBoard is equal to.', 'start': 1093.554, 'duration': 3.804}, {'end': 1098.279, 'text': "And then we're going to go new.", 'start': 1097.378, 'duration': 0.901}, {'end': 1101.302, 'text': 'And this is going to be multidimensional array again.', 'start': 1098.499, 'duration': 2.803}, {'end': 1107.99, 'text': "And then what we're going to do is we're going to create an array that is going to have all of our monsters inside of it.", 'start': 1101.707, 'duration': 6.283}, {'end': 1111.052, 'text': 'And when we want to create an array of monsters.', 'start': 1108.31, 'duration': 2.742}, {'end': 1118.195, 'text': 'basically the format for that is just going to be whatever the object name is, which is going to be monster2, followed by brackets.', 'start': 1111.052, 'duration': 7.143}, {'end': 1121.517, 'text': 'And then you need to give an array name.', 'start': 1118.616, 'duration': 2.901}, {'end': 1123.598, 'text': "So we're just going to call this monsters.", 'start': 1121.637, 'duration': 1.961}], 'summary': 'Demonstration of calling a method in monster2 class to create battleboard, showcasing object-oriented programming and creating a temporary battleboard container with an array of monsters.', 'duration': 62.048, 'max_score': 1061.55, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU1061550.jpg'}, {'end': 1181.307, 'src': 'embed', 'start': 1158.356, 'weight': 4, 'content': [{'end': 1165.759, 'text': "And then if I'm creating four monsters, well, I'm going to say in my array, I want four boxes set aside to contain four monsters.", 'start': 1158.356, 'duration': 7.403}, {'end': 1172.262, 'text': "And then if you want to load those monster objects into this array, let's just go monster or monsters.", 'start': 1166.019, 'duration': 6.243}, {'end': 1177.905, 'text': "And then in the zero index, I'm going to say equal to new monster two.", 'start': 1172.562, 'duration': 5.343}, {'end': 1181.307, 'text': "I'm calling the constructor file that's going to create all these guys.", 'start': 1178.165, 'duration': 3.142}], 'summary': 'Creating an array to contain four monster objects and loading them into the array using a constructor file.', 'duration': 22.951, 'max_score': 1158.356, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU1158356.jpg'}, {'end': 1270.256, 'src': 'embed', 'start': 1242.113, 'weight': 5, 'content': [{'end': 1243.214, 'text': "You can see here's Frank.", 'start': 1242.113, 'duration': 1.101}, {'end': 1245.378, 'text': "Well, there's Frank's represented right there.", 'start': 1243.475, 'duration': 1.903}, {'end': 1247.641, 'text': "And then Drack, he's represented right there.", 'start': 1245.598, 'duration': 2.043}, {'end': 1248.322, 'text': "And there's Paul.", 'start': 1247.661, 'duration': 0.661}, {'end': 1249.684, 'text': 'And there is George.', 'start': 1248.662, 'duration': 1.022}, {'end': 1255.909, 'text': "So, in this tutorial, you learned how to create a game board, how to make sure all the monsters go exactly where they're supposed to go,", 'start': 1250.126, 'duration': 5.783}, {'end': 1261.131, 'text': 'and also made sure that they all got an individual space to start their life out and before it all ends.', 'start': 1255.909, 'duration': 5.222}, {'end': 1265.334, 'text': "In the next part of the tutorial, I'll show you how to move these guys around without crashing into each other.", 'start': 1261.572, 'duration': 3.762}, {'end': 1267.695, 'text': "And then later on, we'll teach them how to attack each other.", 'start': 1265.514, 'duration': 2.181}, {'end': 1269.115, 'text': 'Leave any questions or comments below.', 'start': 1267.795, 'duration': 1.32}, {'end': 1270.256, 'text': 'Otherwise, till next time.', 'start': 1269.376, 'duration': 0.88}], 'summary': 'Tutorial on creating game board, placing monsters, and future plans for movement and attacks.', 'duration': 28.143, 'max_score': 1242.113, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU1242113.jpg'}], 'start': 1040.731, 'title': 'Java method execution and array creation', 'summary': 'Discusses calling and executing methods in a class, emphasizing ease of object-oriented programming, creating a multidimensional array for a temporary battleboard container, and creating an array to store four monster objects for a game board.', 'chapters': [{'end': 1101.302, 'start': 1040.731, 'title': 'Java method execution and object-oriented programming', 'summary': 'Discusses calling and executing methods inside a class, emphasizing the ease of object-oriented programming and creating a multidimensional array for a temporary battleboard container.', 'duration': 60.571, 'highlights': ['Calling and executing methods inside a class, like Monster2.buildBattleBoard, simplifies the process of creating a BattleBoard.', 'Object-oriented programming simplifies the creation of tools in the background, making it easy to create other elements.', "Creating a temporary BattleBoard container involves using a multidimensional array, such as 'tempBattleBoard = new type[][]'."]}, {'end': 1270.256, 'start': 1101.707, 'title': 'Array creation for game monsters', 'summary': 'Discusses the creation of an array to store monster objects, with a demonstration of creating four monsters and loading them into the array for a game board.', 'duration': 168.549, 'highlights': ['A demonstration of creating an array to store monster objects and loading them into the array for a game board.', 'The process of creating four monsters and loading them into the array is illustrated, with specific attributes such as health, attack, and movement being assigned to each monster.', 'The tutorial covers the creation of a game board and ensuring each monster has an individual space to start their life, while hinting at the upcoming lessons on movement and attacking for the monsters.']}], 'duration': 229.525, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_pUz-GJcdRU/pics/_pUz-GJcdRU1040731.jpg', 'highlights': ['Calling and executing methods inside a class simplifies creating a BattleBoard.', 'Object-oriented programming simplifies creating tools in the background.', 'Creating a temporary BattleBoard container involves using a multidimensional array.', 'Demonstration of creating an array to store monster objects for a game board.', 'Illustration of creating four monsters with specific attributes and loading them into the array.', 'Tutorial covers the creation of a game board and individual space allocation for monsters.']}], 'highlights': ['The tutorial series is focused on creating a simplistic video game in Java, involving an immense amount of logic and learning opportunities.', 'Demonstration of creating an array to store monster objects for a game board.', 'The algorithm assigns the X and Y positions to the monster object after finding a suitable location, and tracks the number of monsters created using a basic constructor.', 'The positioning algorithm utilizes the condition of only allowing monsters to occupy spaces with a star representation, ensuring they are not placed on top of each other.', 'Object-oriented programming simplifies creating tools in the background.']}