Rick's Tech Talk

All Tech Talk, Most of the Time

Tetris Update

I've been on a roll with my Tetris development the past few days. Of late, I've implemented "pause" and "fast fall" (or "fast drop"). I've also added the ability to build a "mound". While working on the code to make the mound (the collection of pieces that pile up on top of each other), I found it helpful to dump the contents of my "grid" to a file. Here's my grid after playing the game for a few minutes. Clearly I now have to work on "clearing the rows" next!
  1. ..........
  2. ...##.....
  3. ...##.....
  4. ..........
  5. ...mm....m
  6. mmmmmmmmmm
  7. mmmmmmmmmm
  8. mmmmmmmmmm
  9. mmmmmmmmmm
  10. mmmmmmmmmm
  11. mmmmmmmmmm
  12. mmmmmmmmmm
  13. mmmmmmmmmm
  14. mmmmmmmmmm
  15. mmmmmmmmmm
  16. mmmmm.m.mm
  17. mmmmmmmmmm
  18. mmmm..m.mm
  19. mmmmmmmmmm
  20. mmmm...mmm
  21. .mmm..mmmm
  22. mmmm.mmmm.
Tags: