Giter Site home page Giter Site logo

tic-tac-toe's Introduction

tic-tac-toe

Description

A game of tic-tac-toe which prints user input to a tic-tac-toe board, checks the input, checks winning conditions and declares a winner (but does not declare a loser!)

The game also features an unbeatable AI, using the Minimax decision procedure.

tic-tac-toe's People

Contributors

jackfrancismurphy avatar

Watchers

 avatar

tic-tac-toe's Issues

The game claimed I drew when I actually won

I played the game and happened to get 3 in a row on the very last move. However the game claimed I drew.

Final game output:
X ┃ O ┃ O
━━━━━━━━━━━━━━━━━━
O ┃ X ┃ X
━━━━━━━━━━━━━━━━━━
X ┃ O ┃ X
It's a draw!
True

Steps to reproduce:

  1. Pick player 1 as 'X'
  2. Player 1 picks position 1
  3. Player 2 picks position 2
  4. Player 1 picks position 6
  5. Player 2 picks position 3
  6. Player 1 picks position 7
  7. Player 2 picks position 4
  8. Player 1 picks position 5
  9. Player 2 picks position 8
  10. Player 1 picks position 9

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.