3

small qt app to play wav file


Finally , after being very busy for preparation techtatva09 (MIT's tech fest), I got some time today.So thought of continuing my experimentations further. After hours of brainstorming, came up with my first qt app, a small app to play and stop wave files. Using the help of QSound libraries for achieving it. Coincidently, this my first gnu/c++ GUI program.

Here is the screenshot.
2

Tic Tac Toe v2.0 GUI

Finally, after a week full of tests i am free now. The code which I had posted below was indeed an incomplete one. Haritosh took time on building the GUI interface and indeed , he built it great.
Then came the debugging process which ate up almost entire Sunday of ours but finally its done.
Its almost complete but a few glithces are still there. So , here is the first game which I wrote from the scratch and finally its done. It feels good really good. :)



http://pastebin.com/fb2b5e22
0

Misery ends...game is done..Tic tac toe is up and running

Finally , after long sessions of coding, debugging , again coding again debugging and lots and lots of frustration, the code ends today at 200 hours in morning.
It went through a lot of troubles, revamps, version changes and above all blunders. Code debugged by me was overwritten by haritosh (as he took the earlier version and saved it over mine). The problems of coding a Turbo C++ code in linux with a cranky DOS emulator like DosBox just added to the trouble. But it finally paid off. The code is done, the AI is working perfectly.
Now, the next thing in my mind is to port it to GUI to make a proper graphical game even for lamers.

So, work begins from now.

here's the source code. Its of roughly 212 lines compared to other scripts we found on net which had more than 700 lines but AI was very poor or wasn't there at all.

All I can say that a good start by me towards serious level of software programming.

http://pastebin.ca/1525066

PS:here it is shown of 450 lines because of useless space introduced by the site.
0

Tic Tac Toe misery

Well a few days back I started working on a code for a simple tic tac toe game in C++ entirely. The game is supposed to feature very good computer AI.

I am doing logical part and a dear friend of mine, Haritosh, is doing GUI and presentation of the game. Spent two days discussing the idea and the algorithms, finally got down to coding. After another two sleepless nights, I completed the code. When compiled gave me 25 errors, I was shocked.
Well, another day was spent in correcting those errors. When project seemed nearly finished , i decided to play a dummy game. When run , it started giving unimaginable logical errors (some of them like both u and computer have won the game). Enough of this brotherhood, I decided to give more of my precious time to this. So 2 days have already passed and I have removed most of the logical errors but the biggest one remained. The game carried on even after someone wins. I was frustated to death then Haritosh(the had already finished the GUI) came to my rescue and pointed out the error.
I was using character array but in the func for checking the winner and terminating the game, i had used integer array in parametres. So, it was converting char array to int array and was acting bizarrely. Finally after this much debugging, i am ready to complete it by a day or two. And had a good night's sleep yesterday.
 
Copyright © PRATIK ANAND's weblog.