Giter Club home page Giter Club logo

hardcoretictactoe's Introduction

Tic Tac Toe Game with Arduino

This is a Tic Tac Toe game that uses an Arduino board to control the game pieces. The game is played on a 10x10 board, and the objective is to get a row, column, or diagonal of X's or O's before your opponent does.

Requirements

To run this program, you will need:

  • Python
  • PySerial
  • An Arduino board

Installation

  1. Connect the Arduino board to your computer via USB.
  2. Install the PySerial package by running pip install pyserial in your terminal.
  3. Download or clone the repository to your local machine.
  4. Open the file 10X10.py in your preferred text editor.
  5. Modify the makeblock variables in the draw_board function to match the name of the serial port that your Arduino board is connected to. This should be in the format "comX" on Windows.
  6. Save your changes and run the program using python 10X10.py.

How to Play

  1. The game starts with an empty board.
  2. Player 1 goes first and places an "X" on the board by inputting the x and y coordinates of the cell they want to play in.
  3. Player 2 (the CPU) then places an "O" on the board by selecting an available cell.
  4. Play continues until one player gets a row, column, or diagonal of three X's or O's, or until the board is full.
  5. If a player wins, the game ends and their victory is announced. If the board is full without a winner, the game ends in a draw.

Credits

This game was created by [email protected] as a programming exercise.

hardcoretictactoe's People

Contributors

rahualrai avatar

Watchers

 avatar  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.