![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
[C++] QTicTac
This is a port of the java version of my final project for a comp. sci. class.
It is written in C++ and makes use of Boost and Qt. I wrote a naive minimax algorithm which seems to do the job nicely. I tried to be very clear in the code but it is C++ ( ) so I'd be happy to answer any question or clarify things.It's hosted on googlecode: http://qtictac.googlecode.com Comments would be awsome. ![]()
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
|
|
#2 |
|
Professional Programmer
|
Very interesting. My Minimax/Negamax implementation looks a lot different, hehe
![]() |
|
|
|
|
|
#3 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
I never claimed I knew what I was talking about.
![]()
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
|
|
#4 | |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
Quote:
... Please?
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
|
|
|
#5 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Only two dimensions?
Let's see a 3x3x3 version ![]() What do you think of Qt?
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#6 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
Well, it was easier then using Swing in Java, that's for sure. Qt has amazing documentation and lots of helpful tutorials and examples
I've never really programmed a GUI before this so I don't really know how it compares overall. I definitely like the signals and slots mechanism. Something like this (from my code): connect( uisettings_, SIGNAL( startButtonClicked() ), uiboard_, SLOT( startGame() ) ); is very clear (at least from my POV).
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
|
|
#7 | |
|
Sexy Programmer
|
Quote:
! How much C++ knowledge would you say someone would need to build (good) GUI apps with Qt?
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
|
#8 | ||
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
Quote:
Quote:
If you know basic C++ (classes, inheritence, dynamic memory, etc) and some good (if not required) conventions such as seperate header files and initializer lists, you'll be fine.There are tons of in-depth tutorials and examples that are fully explained at the Qt site here http://doc.trolltech.com/4.3/index.html .
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
||
|
|
|
|
|
#9 | ||
|
Sexy Programmer
|
Quote:
Quote:
__________________
I would love to change the world, but they won't give me the source code! |
||
|
|
|
|
|
#10 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4
![]() |
I've added some stuff to the googlecode page at http://code.google.com/p/qtictac/ including an exectuable for x86 Linux and some more screenshots. All you need is Qt >= 4.2.
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|