Learn about adding additional game logic.
- [Instructor] In the last video,…we created these utility functions…that we're going to make use of.…makeAiMove, random, and our winChecker.…Now, we're going to bring all of these together…for the last piece of functionality for our game…that will go here, in move.…Right now, we're just console logging…our marker in the index,…but let's actually make use of those now.…We're going to wrap the whole move function…in one big setState,…because the state is where we're going to be…holding all the information about our game.…We're also going to use…this neat syntax…for this that sets date.…
It allows us to access…previous state and props.…I'm just going to change around…some of the formatting here,…and now we're going to bring in some variables…that we need to make use of.…I know we're going to want to know about gameState,…want to know about yourTurn,…whether or not it's our turn,…we're going to want to know if the game's over,…and if there's been a winner,…and these are all a part…of previous state.…
If there's any confusion here,…
- 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
2. Deployment Environments
3. App Functionality
4. Implementing Libraries
5. Creating Components
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take 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.