Monday, November 18, 2019

Project 3 Day 10

Based off the group, we thought that the drop speed was going too fast as levels increased, so I made the speed slower as levels increased.

There was an issue where if there was a block above a dropping block and you pressed the space bar, then the dropping block would move on top of the block that was above it.

At first I thought the issue was that the input was going too fast, so I tried to make a delay after pressing the space bar, but that was not the issue.

It turns out there was a bug in the function being called by the space bar. It tried looking for the max y to place the block, but the y range should have been smaller. The range should have been from 0 to the block's y rather than the max available on the grid.



Saturday, November 16, 2019

Project 3 Day 9

I fixed an issue of when the down note was playing too long by creating a variable that keeps track of the history of when the down button is pressed. When it is pressed the down variable is set to true meaning the key was pressed and when it is true it plays the note.

There was also an issue with our spacebar command. The issue was that if there were blocks such as the L blocks and the I block at a specific position then a box from that block would go out of the grid. To fix it I created a function to predict when that specific box would go out of bounds, and if it does then it means the block has to move up a bit.

Wednesday, November 13, 2019

Project 3 Day 8

I made a game over screen. Some issues involved using the write methods to make the visuals of the screen. Some other issues included trying to make sure blocks stopped spawning once the game over screen happened and how to regenerate blocks once the user wants to play again.

I also tried to set up a high score mechanic using a tuple array. One of the biggest issues was that the program made a score of one game into multiple high scores. The issue was I placed the function in the draw method where the tuple would be constantly be changed. So I placed the function to update the high scores into a method that was called once we get a block of a y value of 30.

Tuesday, November 12, 2019

Project 3 Day 7

I worked on a bug that did not update level correctly

I also tried to make some small polishes by moving the score change method from the game.cs file into the gameStat.cs file

I also made some polishes by making the code more readable by not using magical numbers and also by fixing the code to use proper syntax.

Sunday, November 10, 2019

Project 3 Days 5-6

Day 5

I worked on some scoring code, and found out that some code with shifting down was faulty.

I talked to my group about this problem, and Jackson was able to fix the problem.

This took me about a hour to code and an hour to communicate

Day 6

I found a bug in the code with removing after trying to test more cases with all the blocks programmed in. The addition of the square piece made me realize my code had some bugs where it would remove more lines than it was supposed to. The bug was in a nested loop where I would end the loop too early. The issue should be fixed now.

Friday, November 8, 2019

Project 3 Days 3-4

Day 3

I have been observing the work that the other groups and my group have been doing so I can make my code adaptable to their code.

So far I have worked on code to remove the lines after line detection and moving down the lines above the removed line.

I hope to work on more edge cases for these functions

Took me 2 hours.

Day 4

I tried running the main tetris code, but there was an error where a file was missing. I started doing this late, and I hope to get a reply on the Piazza post I wrote

I worked on a levelUpdate function to change the level if the amount of lines gets to a certain amount.

Took me an hour.

Project 3 Day 2

Our groups have been divided to work on certain sections. My team has been assigned to work on Line detection and scoring. For scoring we use a wiki to figure how to add to score, and for level we plan to increase level for every 10 lines.

We still are not sure how we plan to do line movement and we will need to coordinate with Team F who is in charge of movement and blocking. So far we have two ideas one relating to a coordinate system and another relating to a 2D array. Otherwise we have a basic idea on what we need to do for line detection.