Patrick Morrow/Tic-Tac-Toe: Using jQuery, Bootstrap, HTML, CSS and PHP

  • $19

Tic-Tac-Toe: Using jQuery, Bootstrap, HTML, CSS and PHP

In this course you will learn how to create a Tic-Tac-Toe game using jQuery, HTML, Bootstrap and PHP.

Contents

INTRODUCTION

Preparing the development environment

CREATING THE GRID

Setting up the HTML Page
Preview
Setting up the Tic-Tac-Toe grid
Preview
Styling the Tic-Tac-Toe grid
Adding button tracking code

PLAYER SELECTIONS

Dealing with human player selections
How to generate a random number
Preview
Dealing with computer player selections
Adding a delay between human and computer selections
Enabling and disabling buttons

CHECKING WINNING COMBINATIONS

Adding an array of winning combinations
Parameters and Arguments
How to iterate through an array using jQuery
Check for a win - the main logic
Final tweaks
Displaying the Win or Lose Message