Code Monkey home page Code Monkey logo

ttt-plusplus's Introduction

ttt-plusplus

πŸ…ΎοΈ Tic-Tac-Toe++: game and solution

Solver written in C++, based on mappings created through pure duress.

The desktop and web frontend is built on version 5 of Qt, a highly portable GUI library.

❎ Click to play online (via WebAssembly)

About

This project aims to be a solid reference example of a modern C++ Tic-Tac-Toe application, including a full solution to the game.

Stack

See the ttt-plusplus wiki for information on software, building, testing, etc.

Archive

ttt-plusplus's People

Contributors

avindra avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ttt-plusplus's Issues

Ongoing improvements

Next:

  • Decouple core game code from Qt
  • Tests
  • Harden impossible mode: can be beaten still in 1 specific way :^)

Nice to have:

  • Continuous integration
  • Backport build to Windows†

Notes

† The project was bootstrapped with and for Visual Studio 2008, and the story on MS build compatibility is unknown to me. So the build got moved to CMake which is commonly used with Qt projects.

Impossible Mode Failure

The impossible mode AI can be beaten with the following moves:

_|_|4
_|_|1
_|2|3


To prevent this from happening, the computer must block at #3, when the user 
makes #2. This is done properly in the C# implementation, but is lost in 
translation.

Original issue reported on code.google.com by aavindraa on 5 Jan 2011 at 9:51

Modernize repo

2020 refresh

  • Qt 4 -> Qt 5
  • Linux-first build
  • Visual Studio† -> CMake
  • Code organization / cleanup (pass 1)
  • Fix impossible mode bug #2 (~10 year anniversary edition)
  • Decouple computer move logic from window code

Impossible AI can be beaten in specific condition

The original issue was reported on code.google.com:

  • User: aavindraa
  • Date: 6 Jan 2011 at 5:49

It can beaten like this


2|4|3
_|_|1
_|_|_

The proper response for the AI is to play in spot 3 when spot 2 is taken.

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.