Tic-Tac-Toe game created at code bootcamp
To view this, download all of the files and open the index file in a browser. No special setups are necessary.
This game was assigned at the end of the JavaScript section of the bootcamp. We used HTML, CSS and JavaScript as well as jQuery and Bootstrap.
Our game title is a play on words on "Noughts and Crosses", as tic-tac-toe is known in the UK.
We worked hard on setting up arrays and loops to identify a winner. While we started using if-then statements, we quickly realized that this would not be scaleable in a more complex game. We then decided to make arrays of winning combinations that could be looped through a Win Checker function. However, we recognize that creating a winning combos array for a more complex game would also be resource intensive. Given more time, we would have liked to experiment with a "Winning Combo Generator" where the program could recognize a winning pattern rather than have us input all possible combinations.
Once the functionality was in place we started to style it. If I spend more time on it, I would like to make the game look more elegant (continuing the sleek look of floating white squares on a black background) and swapped out the symbols we chose initially.
We also experimented with SweetAlerts but were unable to use them in the beginning because we were unable to delay when they come up. This meant that the box asking for Player 1's name was immediately replaced by the box asking for Player 2's name. With more time, we would have liked to look for Bootstrap modules that would look nice and have the funtion we wanted.