Team-7 Base Branch

11/03/2020 – My team and I gathered via Discord and discussed our upcoming issues on GitHub with no assignees. We divided up tasks among each other.

Morgan and Brian tackled the task of implementing the GameState class, which constituted the object to allocate variables for the beginning level, score, amount of lines cleared, grid (a two-dimensional array of blocks), active GameShape, and next GameShape. In order to maintain the level, score and amount of lines cleared, these variables were declared public. While the other variables grid, activeShape, and nextShape were private. The private methods all contain getter methods, which allows the access of the these state variables. When a Tetris shape is placed by the user, the activeNext() method must be called. This method with cycle the next shape in the queue, and re-instantiate the nextShape variable with a new GameShape. The grid will inherently be affected with this existing functionality.

The input action was already completed by Greg, the enums [PlaceDown, MoveDown, MoveLeft, MoveRight, Rotate, Pause, Null] existed. Brian took on the inputReader class. He accessed the userʻs current keystroke state and stored that single input. The input was then ran through a series of checks wherein the according keystroke is assigned the corresponding Input Action Enum and is returned to the caller.

StateRenderer was assigned to Tom and I, we drafted out some pseudo-code and investigated the surrounding methods and classes. By running the provided OldGame loop, we referenced some components that rendered what we wanted our version of Tetris to render. In order to do that we had to make some edits to the drawing classes that included game statistics. The current version was not catered to our new GameState class. After a couple tweaks and revisions we had the logic we needed. Just need to test it out as a whole when all the code gets merged into the master!