The blog has now moved!

Friday, January 12, 2007

Missed a Beat - Thursday

Well, the reason I didn't blog yesterday was because there was a problem with my internet, I spent twenty minutes today fixing it (with Pete's help). Wednesday involved a Java lecture where we (as a class) did a mock test. I scored 80% and reckon I can improve on that score. Later I helped setup for the open day then left to do some last minute revision for an exam I dislike. The exam itself however went better than I expected (hey, I prayed for it, what did you expect to happen?). I got to go up the Spinnaker Tower for free as part of being a tour guide, it's very high up, a very nice view and on the lowest viewing platform there is a section of glass floor. I walked across it and despite the fact that the glass is probably bullet proof and my reaction speed enough to grab a banister at the slightest sign of a crack, it was very unnerving. I also got about 30 packs of cookies (for a total of 60 cookies), a handful of sugar sachets, a litre of orange juice and also free food for most of the day. Not too bad methinks, oh, I was also paid for it in the region of £50. Lauren and I were the only ones in that evening so we had chicken (I had lots of vegetables at the insistence of Lauren). We watched "A fish called Wanda" and I later stayed up later than intended playing games. Don't worry, read on to find out how I've made up for it. Today (Thursday for those with a bad memory) I had my weekly lie in of until about 1000 and then went to my Digital Lab. Chris and I are working very very well as a team. He sits there puzzling over the Hardware for Digital Labs, I sit there figuring out the problems with Java. We then tell each other what we've done and both benefit. I did help with the Digital stuff and he's been helping with the Java so we do have some idea of what the other is doing. After the lab I got some supplies at Tesco and went home. There I relaxed by playing Warcraft 3 a little. I do mean a little because at the time of writing my Java is not too bad.

  • Displays a Chess Board - Check
  • Allow the User to move pieces - Check
  • Determine if a move is valid or not - Check
  • Watch for Check and Checkmate - Check (Pun intended if you think it's funny)
  • Play over a Network - Not done yet
  • Look remotely nice - Ummmm, you decide
On the plus side, when it's done I'll release the compiled version of the code and give instructions on how to run it assuming Chris and Ionnais do not have a problem with it. It's currently 0016 on Friday and I've got one last thing I'd like to talk about. Checkmate. It's what I spent a lot of time today doing and getting annoyed over when I made a mistake.
  1. You need to know if something can move somewhere, that's not a huge problem but if you make a mistake here (guess where I made a mistake...) it'll come back to get you later
  2. You need to be able to check every single piece going to see if it can take a king, if it can then you need to declare a state of check and possibly checkmate
  3. Here's the fun one, Checkmate requires you to create a second board and simulate as many moves as possible until there are no moves left to make or the king gets out of check
I will unashamadly say that my "vast" experiance of programming really really helped here. I've had to redesign my programs to incorperate something before, checkmate is a very good example of it as the program is based around "the board". All the functions such as finding out where something can move are based around that board, not a virtual one, that one. Of course, I solved the problem very compared to how problematic I thought it would be. To anybody thinking about doing a course at university that involves programming. Practice now, I'll happily tell you how to get started.

5 comments:

Major Look said...
This comment has been removed by the author.
Major Look said...

Glad the programming is going well, and 80% is a very high score. I hope you can rplicate that in real tests!

Had a look at the chess board - uuuuurgh!

Here's a suggestion - how about Black and white squares?

Teifion said...

I'm thinking about it but I quite like red and green for now :P

Emz said...

The colours are ok, but not that easy on the eye. And considering most chess games take about 15 mins, maybe more, you need something a little easier to look at. How about black and white, like your dad suggested, or blue and white?

Teifion said...

Typical, you're all against me. FINE. When I've done the Networking (the only part remaining) I will change the colours. Maybe White and Black or White and Blue, just to do something you didn't suggest.