Giter Site home page Giter Site logo

domosayshello / tic-tac-toe-hw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from the-marcy-lab-school/tic-tac-toe-lab

0.0 0.0 0.0 25 KB

Tic-Tac-Toe lab which can be implemented with DOM manipulation or React.

License: GNU General Public License v3.0

tic-tac-toe-hw's Introduction

Lab: Tic-Tac-Toe

Directions

For this cumulative lab, you will simply build a Tic-Tac-Toe game using React components and Vite. To get started, make your own repo using npm create vite and when you are done, submit the link to your repo.

Here are your requirements:

  1. Your Tic-Tac-Toe game should be designed as a two-player game. In other words, you are not responsible for creating a CPU or an AI to play against user. Your game should simply alternate between 'X's and 'O's upon clicks, allowing two players to sit next to each other and play on one computer.
  2. There is a form on top of the screen that allows the players to enter their names, the defaults are "Player 1" and "Player 2."
  3. Your game should clearly identify a winner or indicate when a "draw" has occurred.
  4. Once there is a winner, neither player can place anymore X's and O's on the board.
  5. Your game should have the ability to "restart" without refreshing the page by clearing the board.
  6. Do not work on styling until you have a fully-functioning Tic-Tac-Toe game

Guiding Principles

Your submission will be scored against the following criteria:

  1. Game Play:
  • Is your game intuitive to play?
  • Does your game produce a winner and/or draw state in line with the rules of tic-tac-toe?
  1. User Interface/Experience:
  • Is your game board visually appealing?
  • Does your game respond predictably to user input?
  1. Code Quality:
  • You must not put all your logic into a single file
  • Think about what components you need
  • What data do you need to store as state?
  • Does the form need controlled inputs or not?
  • How can you automatically generate the 9 board spaces?

Brownie Points ๐Ÿง

Once you have satisfied the requirements above, consider implementing the following feature requests as an added challenge! ๐Ÿ’ช๐Ÿฝ

  • Add CSS style to your game
  • Add a scoreboard
  • Implement a single-player mode by adding a Computer player. Your computer player can be "dumb" and just place 'O's in a random available space.
  • Build an AI that competes intelligently. ๐Ÿ˜ณ

tic-tac-toe-hw's People

Contributors

thuyanduong avatar mostlyfocusedmike avatar rogbonna1 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.