UPDATE [15:50]
I found the mistake! What's interesting is that the new bits were (in most part) correct and it wasn't these that caused the problem. Once I went through them over and over and was sure that they are correct, I started looking back and found the mistake in the set up of the board. It was just a wrong list given in one spot that didn't influence anything until this spot.
UPDATE [18:55]
I kept improving the code and right now all the pieces move well - only diagonally by 1.
However some of the things which I have implemented don't work yet - the pieces don't beat yet and I have to see what is wrong there.
Lastly there are some things which I simply didn't put into the game - for example the pieces move backwards as well as forwards at the moment.
I think I am well on at least 30% with the game. The following is a quick list of what I still have to add (not strictly ordered):
- Beating Pieces and further movement restrictions (as above),
- Kings,
- algorithms for the program to make sure the game is run properly (so the program can "see" if there is a piece that can be beat etc.)
- the order of the game - start and finish, checking if ended (won), turn system.
No comments:
Post a Comment