Giter VIP home page Giter VIP logo

tic-tac-toe's Introduction

tic-tac-toe

###Play Tic-Tac-Toe Now!.

How to Play

Player X goes first and must click on one of the buttons.

Player O will go second.

If Player loses they get to go first in the next round.

If it is a Draw Player X gets to go first in the next round.

The rounds are unlimited.

If you want to start a new game with both Players at 0 wins press start new game Warning all data will be cleared!

Technologies Used

-HTML

-CSS

-JavaScript

-jQuery

-Sublime

-BitBalloon

-Github

-Web Browser

-Chrome Developer Tools

-Terminal

-Git

-Computer

-The Internet

The Approach Taken

I first started with wireframes to get a general idea of what I wanted the interface to look like and what buttons and inputs shouild do.

Second part was attempting to replicate the wireframe with HTML and CSS. Could not quite get it to look the way I wanted, but had all the needed HTML elements to start working with jQuery.

Third part was working with jQuery and used a fair share of if/else statements. Started with .click on all of the button elements to have them change to x or o. After that I set each buttons text to a variable and used the variables in a long list of if/else statements in order to pick a winner. Then I created variables to hold player scores, which I impemented into the if/else statements. After getting user score counts I finished off with a scoreboard that would use the playerscore variables. Then I found a way to create a function that would reload the page and created a button that would execute the function and restart the game.

Unsolved Problems

DRY DRY DRY. I wanted to use arrays and for loops to cut down on the if/else statements.

tic-tac-toe's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.