Exercise: Creating Boards

In this lesson, you do an exercise using functions that creates a board and populates it with game pieces.

We'll cover the following

Task

An ambitious game developer wants to make one of the top 10 games in the world. However, there is a problem. Because he makes board games, it takes a lot of his time to create the board and populate it with game pieces. To speed up this process, he has asked you to make his work quicker and simpler.

Your task is to create a function that first generates a board (two-dimensional array) and then populates that board with values using an array of pieces, where each piece is an object with board coordinates and the value of the piece within the board.

Get hands-on with 1200+ tech skills courses.