Learn about setting up the functionality for a game.
- [Instructor] Now, I'm going to initialize…another variable, called squares…with a lowercase, and I'm going to set this…equal to coordinates….map.….map is a method that's available to arrays.…It's going to look at the current contents of coordinates…and then return a new array,…based on the parameters that we give to it.…It accepts an arrow function as an argument,…and that arrow function can accept…another two arguments, position and index.…
We'll finish that arrow function…with a pair of brackets.…This is where we're going to specify…what we want to be created in this new array…that .map will return.…I know that I want each of the individual squares…that's going to go into the squares array…to have access to the move function…that we declared up here on 42…and we originally created in our Tic-Tac-Toe containers.…I'm going to say…let makeMove…equal move.…Then, I also want to make sure each of the squares…that I built has access to the mark that should go in it.…
Remember from several videos ago,…I said I'm going to be storing…
Author
Updated
6/26/2017Released
4/7/2017- Installing local dependencies
- Generating a starter project
- Deploying to Heroku
- Planning your development process
- Using styled-components
- Styling for mobile
- Setting up models on Graphcool
- Creating Relay mutations
- Adding Relay to your authentication flow
- Protecting routes with authentication
Skill Level Intermediate
Duration
Views
Related Courses
-
Building a Web Interface with React.js
with Ray Villalobos1h 21m Intermediate -
Learning Redux
with Alex Banks2h 59m Intermediate
-
Introduction
-
Welcome1m 2s
-
What you should know2m 29s
-
Exercise files1m 29s
-
-
1. Planning
-
Design overview of the app5m 36s
-
Generating a starter project6m 43s
-
Creating a Git repository1m 50s
-
Preparing for relay9m 26s
-
Setting up React Router10m 36s
-
Creating children routes3m 26s
-
Implementing Material-UI6m 29s
-
Deploying to Heroku7m 3s
-
-
2. Deployment Environments
-
Building a nav drawer6m 27s
-
Nav drawer functionality4m 41s
-
Nav drawer links3m 44s
-
Using styled-components6m 32s
-
Styling for mobile9m 4s
-
3. App Functionality
-
Canvas setup8m 16s
-
Building boards10m 3s
-
Creating squares6m 45s
-
Square functionality9m 39s
-
Building AI8m 14s
-
Finishing the game7m 29s
-
Profile page styles6m 12s
-
Profile page records4m 17s
-
-
4. Implementing Libraries
-
Authentication setup4m 46s
-
Authentication class11m 26s
-
Creating user mutation6m 50s
-
Signin mutations3m 1s
-
-
5. Creating Components
-
Creating a Turing test6m 32s
-
Recording the game4m 49s
-
Conclusion
-
Next steps27s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Square functionality