Sign Up that takes big team, email, period, password, and posts to the backend. With fetch, we are able to get a result when we send the data to the back end. Include try and catch to catch errors.
Validate password function checks whether or not the password and confirms passwords match. Also, it checks whether or no the password has all the requirements. (lowercase, uppercase, numbers...).
Improving an Old project
I had made a Tic Tac Toe for my CSP Create Task, about a year ago. However, all the code for disorganized, and it wasn;t very understandable. So, I took more of an OOP approach and organized the code into functions. It is much easier to read now.
Explanation: start off with a javascript 2D array to represent the tic tac toe grid. Then, each element of the 2D array is assigned to an HTML ID. The user starts off my clicking on one of the boxes. If the box that was clicked is empty, then place an O at that HTML ID. Right after, it checks whether or not game is done. With the game_done function. The game_done function essentially loops through the 4 possibilities of being done. That is row-wise, column-wise, left diagonal, and right diagonal. If game_done returns true, then the user won. If not, now it is the computer’s turn to play. A random row and column is produced. If the element associated with that row and column not empty, it produces another one. If it is empty, then place an X there. It now runs game_done function again. Now, if game_done returns true, then the computer won. If it returns false, the game continues. The last possibility is if the game returns a Tie. A tie happens if all the elements of the board are full, but the game isn’t finished. Play again resets the game.
Self Review Score: 0.85/1 There are two sections of this ticket: Sign Up page on the Management Tool