I am shocked...
Today, I stepped on the weight for the first time during the Christmas Break and found out that I had lost 5 pounds!!! My body weight dropped from 120 pounds to 115 in one and a half weeks!
Anyways, today, I spent a half hour attempting to increase the complexity of my Snake Game by adding the notorious tail. I used for loops and counters, employing a method similar to how I added the red circles to the game, however, the tail is encountering numerous errors...
1. Each time the snake eats a circle, the tail is incremented by one. Where the new snake tail is drawn depends on which direction the snake is moving in, so here I need a case statement. I used an array to keep track of the x and y coordinates of all the snake tails (maximum of 60) which could be in play. One for loop controls how many tail circles I want to draw by using a counter, which is incremented by one each time the snake eats a circle (for snakeIndex : 1 .. tailLength) however, here it gets confusing...
The snake cannot hit its own tail, or the game is over. This problem can easily be fixed because it is like hitting a red circle and can be controlled with a for loop. I did not reach this problem yet because I cannot even get the snake tail to be drawn yet! Each time the snake eats a circle, the new coordinates are based on the snake coordinates in front of it, but by subracting one from the array index, when the snake first eats a circle with the index set at 1, the array subscript is out of range. I`m very grumpy right now, so I think that I`ll work on that problem when I finish swimming.
Another problem is that when the user moves the snake, the rest of the body changes direction immediately instead of travelling to the coordinates in which the direction was changed. I know this problem will occur because I encountered it when I tried to incorporate a snake tail to my game at the beginning (apprx. Dec. 10th).
With so many problems and complexities, I`m not sure if I`m going to add a tail after all.
If the culminating activity for ICS involves creating a game, then I am going to work on making a tail. If the culminating activity is not what I think (most likely), then I would have saved some time, work, and frustration...
Tomorrow (and New Year`s Day) I`m going to Blue Mountain again, so I won`t get anything accomplished tomorrow (or Saturday)
That`s all for today...
No comments:
Post a Comment