===========
My first project for GA's Software Engineering Immersive.
Play tic-tac-toe.
Project 0 involved building a 2 x player tic tac toe.
Some features include;
Rendered game board in the browser Change player function. An indication of which player has won or if it's a "cat's game" (draw). A score card for multiple rounds.
1.html 2.CSS 3.javascript 4.jQuery libraries
That are running throughout the program:
- playerOne
- playerTwo
- moves - (representing the button div's on the game board)
- currentPlayer - (representing either "X" or "0")
- markButton - (functions as a counter for the buttons clicked, specifically in the "if" statement for "cat's game")
-
changePlayer - switches player consecutively.
-
checkForWin - Takes the buttonNumber and current player through the if statements to determine if there has be a win for player "X", "0" , else "cat's game" if markButton === 9. If Game result delivers any of the messages indicated in the "if" statements, the buttons are then disabled. ( off.click)
-
buttonRefresh - this function is implemented when the user clicks "New Game" aka (Restart in the html). This resets the markButton back to 0(amount of clicks), and clears the array of moves( buttons clicked on the games), it also changes the current player back to "X".
-
Game Result - message is tied in with the if statements.
-
The score card for playerOne and playerTwo are retrieved through the 4th line in each "If" statements. It displays "Player One" or "Player Two" accordingly, then values of those Variables are added to the game, I have used string interpolation here.
![Moving Clouds] https://giphy.com/gifs/sky-clouds-cloudy-d5PPYjcb3caPTHM3hv
Version 1.0
- Current working version.
-
Customising the player name to personalise the user experience.
-
Networking multiplayers.
-
Creating an AI opponent for a single user.