Saturday, January 16, 2010

Download

I made it possible to download the game file with a new feature of Google Docs. Click HERE to download the game! [Update - the rules clarification is there now as well].

I was deceived

I was so happy to be done, I actually forgot a bit of the game. However my testers group (including Michal and myself) played the game yesterday and I realized I have not implemented the ending sequence. Whenever I was checking how I'm doing with the program, I would simply check whatever I was working on - e.g. displaying, moving, captures. I never actually got to the last stages where a player wins and that part of the game kinda got lost in my head. Now that I remembered it, I decided to send a MessageBox once the game ends. It makes it very clear that the game has ended.

It was actually an interesting fault - it proved the usefulness of a testing team for one! :D It also shows what is true about the plan - I have been using it heavily in the beginning, but later I depended on my head more and more until I stopped using it. I also stopped putting changes into it, as they just all happened in my head (and here). Finally, once I finished I did not go through it and check that I've done everything, and because I've changed many things, it wouldn't be perfect either. In projects bigger in scale such approach would probably not work since it would be too hard to keep all the info fresh in the mind (as the situation showed, even at this scale wrong-do's happened).

Now the game is officially tested and finished :)

Thursday, January 14, 2010

Work officially finished!!!! ... or is it?

I have finished the code!

Even the final changes did cause me some problems, but I managed to overcome them and now the game is completely finished. I've also added a bar on the right which shows whose turn it is. I also added a bonus! When the up arrow is pressed, the color of the white field -> It gets more and more bright, until it reaches perfect white. If it is pressed again it "skips" to complete black and then gets lighter and lighter, circulating as above. This bonus took me about 4 minutes to make and it is an example of how I am going to keep this project "live".

Now that I have finished the whole game, I will not have as much time for programing and will not be able to make such big projects for quite a while. But I will be able to teak this game and play around with it, adding functionality and appearance to it! This is a great way of keeping the learning going even after the project.


Final thoughts:

I am really glad I managed to do this project because it certainly was very challenging! Although I have changed some things from the initial design, some ideas I had to throw out, I am really happy with it and in fact I didn't really expect it to be much more than what it is. This has been a huge leap in my programing skills and I hope to keep up the development (although not as rapid) in the manner described above.

Wednesday, January 13, 2010

work almost done

i have programmed further today and i was very pleased with the
results. I have added turn system which makes the game almost
complete. I even thought so and i went to another computer to make
sure it will wort everywhere. It worked well there with the only
exception of the wrong note message.

Anyways the code is not yet complete, as I found/remembered commu
thing that needs to be added - the ability to do continuing captures
in one move. When i started implementing that, I've felt the reality
of a thought i had a few days ago; that my and does not have enough
functions. That it has to much code just thrown into it instead of a
neat division into "working units". For what i was doing now, such the
functions did not only structure the code, making it easier to follow
and edit, but also came to be pretty much essential!

Therefore i am right now in the midle of restructuring a part of the
code. Then I'll look up one more concept (overloading functions) which
will be handy here and will be a good practise use. I simply need to
remind myself what the notation in this case is.

The structure of the code is a perfect example of a case job. The
better is done, no matter the amount of effort, the easier the further
work is (just like the design was)

Sunday, January 10, 2010

Another step forward

I have just finished implementing the beating rule into to the program. Now when a player has the possibility to capture he is not allowed to make a normal move. I wanted to notify the player of it. I tried writing out text on the window, but it was erased right after the spot only where I could put it.

So I made a windows message box come up. I was reluctant to do it - I think it's a bit too disturbing - but it actually came out alright. Although now that I thought about it, I think there might be a way to make the writing stay for a few seconds if I make the program simply wait. I'll research functions that could help me to do that and I'll see which solution I like more.


UPDATE [16:12]
I managed to do what I wanted with a very simple Sleep() function. Unfortunately the text is quite small and somehow I didn't manage to change that, even though theoretically I should be able to. But never mind that - I placed it in the middle and make the colors visible making it quite noticeable and at the same time not too disturbing.

Today's work

I have written a large, complicated piece of code today. Unfortunatelly, it is only a part of it's... "unit". Therefore, not only it doesn't work yet, I'm also not really able to check weather it works. This makes the work no it harder and more frustrating. That's why my next note will be to set up a way of checking it, even if it's not the final one yet.

What was even more frustrating about all this, was that i all that confusing code I made a small mistake in th begining, very careless. Then, once I finished writing, the whole moving mechanism broke. It took me a long time and a lot of trouble to figure out what was wrong. This problem fixing was not exciting like many before - this was mainly frustrating.

Saturday, January 9, 2010

Small changes

I've got to the point where I'm setting up the rules of the game. There are many variations of the game and so I searched for official rules. I've found a standard set HERE. I was thinking I'll do huffing (removing a piece that could beat if the player does a non-capturing move). However even without that my code is getting really large and complicated and I think I will leave that rule out - especially that it does not figure in the official "tournament" rules. Now the player will simply HAVE TO beat.

Back to work again

I have paused the work for Christmas and new year. I was planning to come back to it slightly earlier (about 2-3 days) but it didn't quite work out (which MIGHT have something to do with me receiving a new season of Heroes, but that's just a theory ;)). Anyways, I'm back home now and I'm starting the work again.

I am using different IDEs on the home computer and the computer I was using in Poland, which was virtually the entire time I programmed until now. When I moved the code there were a few errors which were not there on the laptop, but I managed to overcome them (the previous practice was very useful here). Some of the problems I kind of know where they are coming from, but I'm not sure why. But I managed to get rid of all of them and now can keep working on the actual program.