Disassembling C++ Part 2 -- Objects

What is an object? This article is part two of my Disassembling C++ series.  The first one was here about overloaded functions, and mang...

Sunday, January 21, 2018

Qt5 Tic-Tac-Toe

This was a fairly simple tic-tac-toe game.  The logic behind it is that it goes through every available move and sees which square will give the computer the highest chance of winning.  If two or more squares are equal, it just selects one at random.  To build this program, yu will need a C++ compiler and qt version 5 including qmake installed.  The idea between using characters X and O or to do native drawing commands was a tough one, but I finally settled on native drawing to a pixmap that was pretty big and then applied them to the squares.  The squares themselves are buttons, so that made the event system a lot easier to use.

Get source from here: https://github.com/beneschtech/qt5-tictactoe

No comments:

Post a Comment