Friendly game of tic-tac-toe utilizing React Native & modern features of React (hooks)
cd TicTacToe
npx react-native start
npx react-native run-ios
- Allow 2 players to play tic tac toe (Follow the rules of tic-tac-toe)
- Have a 3x3 grid on which the players can play
- Allow the players to take turns marking spaces on the 3x3 grid
- Recognize when a player has won and declare that player as victorious
- Allow the user to start a new game
- The game is played on a grid that's 3 squares by 3 squares.
- The first player is
X
, the second player isO
- The first player to get 3 of their marks in a row (up, down, across, or diagonally) is the winner.
- When all 9 squares are full, the game is over.
- The players will be using the same device, taking turns
- The first player to act will be
X
- Since I work on OS X I decided to move forward with the React Native directions for using Xcode & CocoaPods.
- I had latest Xcode installed which is 12.4
- I ran into issues where iOS was refusing to build due to cocoa pods using iOS version 8.0 which had been deprecated in Xcode version 12.
- Spent about 30 minutes troubleshooting and found an issue on the CocoaPods repo.
- Was able to get it sucessfully built after removing
TicTacToe/ios/TicTacToe.xcworkspace
, runningpod update
and thenpod install
prior to starting the build.