GithubHelp home page GithubHelp logo

pall-pandiyan / tic-tac-toe Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 6 KB

Creating a simple tic tac toe game (terminal based). Currently the computer's move is totally random, in future we need to improve it.

Python 100.00%
board-game python-game python-script terminal-game turn-based-game

tic-tac-toe's Introduction

tic-tac-toe

Creating a simple tic tac toe game (terminal based). Currently the computer's move is totally random, in future we need to improve it.

ttt.py

In 'ttt.py' I simply implement a 3x3 tic tac toe game. But i feel this one is not scalable to a bigger board for bigger challange. The condition for checking if a player or computer won is seems very hard coded and not at all flexible.

ttt-2.py

I started the 'ttt-2.py' with sole intention of creating something more stable and flexible. In the end I am somewhat satisfied with this result i got. Now i can change the board size (both row and colume number should be a same number for obvious reasons).

Future aspects of improvements

Now if the set the board size to 3x3, the game is somewhat playable. The reason for this is for every computer's turn i randomly picking a empty cell and mark it.

In future i want to choose the best position to win the player.

tic-tac-toe's People

Contributors

pall-pandiyan avatar

Stargazers

 avatar

Watchers

 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.