Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Removing lines  RSS feed

 
Gabriel White
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All, I am having real trouble trying to remove lines from my Tetris board. I have a few methods that I can only ask that you look at.

from this method I am checking whatever row is full (for example say I am checking the very bottow row...row 0 so i = 0, sees a full line (grid array 2's when frozen) and checks for a count and a width to zero in on the line and calls removeRow(i).

And from here it removes that row making row 1 row 0.

It then goes back out to the checkRow method and by now it has iterated past 0 and is not on 1. It is now checking row 1 instead of row 0 for multiple line removal.


what am I missing to make the i go back to zero or to check with antother reference to make these lines drop?

Thanks in advance.

Gabe
 
Gabriel White
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
never mind. It works like a champ.

Sun fix.

Thanks
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell us how you sorted out your problem.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!