Advertisement
Guest User

tetris debug

a guest
May 19th, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.19 KB | None | 0 0
  1. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2.  
  3. grid[3][15].type not 0 (it's occupied), so placePiece() and make a newPiece().
  4. for (int i = 0;i < 4;i++)
  5.  
  6. **** The sacred vars ****
  7. i: 0
  8. legend[piece.type].block.length: 4
  9. legend[piece.type].fetch(i, 0, piece.rotate): 0
  10. legend[piece.type].fetch(i, 1, piece.rotate): 0
  11. piece.type: 1
  12. piece.rotate: 0
  13. x: 2
  14. y: 14
  15. **** END ****
  16.  
  17.  
  18.  
  19.  
  20. 316:
  21. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  22. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  23. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  24. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  25. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  26. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  27. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  28. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  29. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  30. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  31. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  32. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  33. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  34. [ ][ ][ ][ ][4][4][ ][ ][ ][ ]
  35. [ ][ ][2][ ][2][4][ ][ ][ ][ ]
  36. [ ][ ][ ][2][2][4][ ][ ][ ][ ]
  37. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  38. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  39. [7][ ][ ][2][7][4][4][4][6][6]
  40. [7][1][ ][7][7][4][2][5][6][6]
  41.  
  42.  
  43.  
  44.  
  45. **** The sacred vars ****
  46. i: 1
  47. legend[piece.type].block.length: 4
  48. legend[piece.type].fetch(i, 0, piece.rotate): 1
  49. legend[piece.type].fetch(i, 1, piece.rotate): 0
  50. piece.type: 1
  51. piece.rotate: 0
  52. x: 2
  53. y: 14
  54. **** END ****
  55.  
  56.  
  57.  
  58.  
  59. 316:
  60. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  61. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  62. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  63. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  64. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  65. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  66. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  67. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  68. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  69. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  70. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  71. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  72. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  73. [ ][ ][ ][ ][4][4][ ][ ][ ][ ]
  74. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  75. [ ][ ][ ][2][2][4][ ][ ][ ][ ]
  76. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  77. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  78. [7][ ][ ][2][7][4][4][4][6][6]
  79. [7][1][ ][7][7][4][2][5][6][6]
  80.  
  81.  
  82.  
  83.  
  84. **** The sacred vars ****
  85. i: 2
  86. legend[piece.type].block.length: 4
  87. legend[piece.type].fetch(i, 0, piece.rotate): 1
  88. legend[piece.type].fetch(i, 1, piece.rotate): -1
  89. piece.type: 1
  90. piece.rotate: 0
  91. x: 2
  92. y: 14
  93. **** END ****
  94.  
  95.  
  96.  
  97.  
  98. 316:
  99. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  100. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  101. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  102. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  103. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  104. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  105. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  106. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  107. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  108. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  109. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  110. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  111. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  112. [ ][ ][ ][2][4][4][ ][ ][ ][ ]
  113. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  114. [ ][ ][ ][2][2][4][ ][ ][ ][ ]
  115. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  116. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  117. [7][ ][ ][2][7][4][4][4][6][6]
  118. Do they equal? false
  119. [7][1][ ][7][7][4][2][5][6][6]
  120.  
  121.  
  122.  
  123.  
  124. **** The sacred vars ****
  125. i: 3
  126. legend[piece.type].block.length: 4
  127. legend[piece.type].fetch(i, 0, piece.rotate): 0
  128. legend[piece.type].fetch(i, 1, piece.rotate): 1
  129. piece.type: 1
  130. piece.rotate: 0
  131. x: 2
  132. y: 14
  133. **** END ****
  134.  
  135.  
  136.  
  137.  
  138. 316:
  139. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  140. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  141. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  142. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  143. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  144. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  145. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  146. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  147. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  148. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  149. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  150. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  151. [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
  152. [ ][ ][ ][2][4][4][ ][ ][ ][ ]
  153. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  154. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  155. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  156. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  157. [7][ ][ ][2][7][4][4][4][6][6]
  158. [7][1][ ][7][7][4][2][5][6][6]
  159.  
  160.  
  161.  
  162. for (int y = 0;y < 20;y++) {
  163. int empty = 0;
  164. for (int x = 0;x < 10;x++)
  165. grid[0][0].type is an empty space, so set variable empty to 1
  166. grid[0][1].type is an empty space, so set variable empty to 1
  167. grid[0][2].type is an empty space, so set variable empty to 1
  168. grid[0][3].type is an empty space, so set variable empty to 1
  169. grid[0][4].type is an empty space, so set variable empty to 1
  170. grid[0][5].type is an empty space, so set variable empty to 1
  171. grid[0][6].type is an empty space, so set variable empty to 1
  172. grid[0][7].type is an empty space, so set variable empty to 1
  173. grid[0][8].type is an empty space, so set variable empty to 1
  174. grid[0][9].type is an empty space, so set variable empty to 1
  175. grid[0][10].type is an empty space, so set variable empty to 1
  176. grid[0][11].type is an empty space, so set variable empty to 1
  177. grid[0][12].type is an empty space, so set variable empty to 1
  178. grid[0][13].type is an empty space, so set variable empty to 1
  179. grid[0][14].type is an empty space, so set variable empty to 1
  180. grid[0][15].type is an empty space, so set variable empty to 1
  181. grid[0][16].type is an empty space, so set variable empty to 1
  182. grid[0][17].type is an empty space, so set variable empty to 1
  183. grid[1][18].type is an empty space, so set variable empty to 1
  184. grid[2][19].type is an empty space, so set variable empty to 1
  185.  
  186. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  187.  
  188. grid[3][13].type not 0 (it's occupied), so placePiece() and make a newPiece().
  189. for (int i = 0;i < 4;i++)
  190.  
  191. **** The sacred vars ****
  192. i: 0
  193. legend[piece.type].block.length: 4
  194. legend[piece.type].fetch(i, 0, piece.rotate): 0
  195. legend[piece.type].fetch(i, 1, piece.rotate): 0
  196. piece.type: 1
  197. piece.rotate: 0
  198. x: 2
  199. y: 12
  200. **** END ****
  201.  
  202.  
  203.  
  204.  
  205. 316:
  206. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  207. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  208. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  209. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  210. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  211. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  212. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  213. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  214. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  215. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  216. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  217. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  218. [ ][ ][2][ ][ ][ ][ ][ ][ ][ ]
  219. [ ][ ][ ][2][4][4][ ][ ][ ][ ]
  220. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  221. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  222. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  223. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  224. [7][ ][ ][2][7][4][4][4][6][6]
  225. [7][1][ ][7][7][4][2][5][6][6]
  226.  
  227.  
  228.  
  229.  
  230. **** The sacred vars ****
  231. i: 1
  232. legend[piece.type].block.length: 4
  233. legend[piece.type].fetch(i, 0, piece.rotate): 1
  234. legend[piece.type].fetch(i, 1, piece.rotate): 0
  235. piece.type: 1
  236. piece.rotate: 0
  237. x: 2
  238. y: 12
  239. **** END ****
  240.  
  241.  
  242.  
  243.  
  244. 316:
  245. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  246. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  247. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  248. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  249. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  250. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  251. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  252. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  253. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  254. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  255. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  256. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  257. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  258. [ ][ ][ ][2][4][4][ ][ ][ ][ ]
  259. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  260. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  261. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  262. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  263. [7][ ][ ][2][7][4][4][4][6][6]
  264. [7][1][ ][7][7][4][2][5][6][6]
  265.  
  266.  
  267.  
  268.  
  269. **** The sacred vars ****
  270. i: 2
  271. legend[piece.type].block.length: 4
  272. legend[piece.type].fetch(i, 0, piece.rotate): 1
  273. legend[piece.type].fetch(i, 1, piece.rotate): -1
  274. piece.type: 1
  275. piece.rotate: 0
  276. x: 2
  277. y: 12
  278. **** END ****
  279.  
  280.  
  281.  
  282.  
  283. 316:
  284. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  285. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  286. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  287. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  288. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  289. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  290. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  291. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  292. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  293. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  294. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  295. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  296. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  297. [ ][ ][ ][2][4][4][ ][ ][ ][ ]
  298. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  299. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  300. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  301. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  302. [7][ ][ ][2][7][4][4][4][6][6]
  303. [7][1][ ][7][7][4][2][5][6][6]
  304.  
  305.  
  306.  
  307.  
  308. **** The sacred vars ****
  309. i: 3
  310. legend[piece.type].block.length: 4
  311. legend[piece.type].fetch(i, 0, piece.rotate): 0
  312. legend[piece.type].fetch(i, 1, piece.rotate): 1
  313. piece.type: 1
  314. piece.rotate: 0
  315. x: 2
  316. y: 12
  317. **** END ****
  318.  
  319.  
  320.  
  321.  
  322. 316:
  323. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  324. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  325. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  326. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  327. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  328. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  329. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  330. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  331. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  332. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  333. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  334. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  335. [ ][ ][2][2][ ][ ][ ][ ][ ][ ]
  336. [ ][ ][2][2][4][4][ ][ ][ ][ ]
  337. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  338. [ ][ ][2][2][2][4][ ][ ][ ][ ]
  339. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  340. [ ][ ][ ][2][2][ ][ ][ ][ ][ ]
  341. [7][ ][ ][2][7][4][4][4][6][6]
  342. [7][1][ ][7][7][4][2][5][6][6]
  343.  
  344.  
  345.  
  346. Do they equal? false
  347. for (int y = 0;y < 20;y++) {
  348. int empty = 0;
  349. for (int x = 0;x < 10;x++)
  350. grid[0][0].type is an empty space, so set variable empty to 1
  351. grid[0][1].type is an empty space, so set variable empty to 1
  352. grid[0][2].type is an empty space, so set variable empty to 1
  353. grid[0][3].type is an empty space, so set variable empty to 1
  354. grid[0][4].type is an empty space, so set variable empty to 1
  355. grid[0][5].type is an empty space, so set variable empty to 1
  356. grid[0][6].type is an empty space, so set variable empty to 1
  357. grid[0][7].type is an empty space, so set variable empty to 1
  358. grid[0][8].type is an empty space, so set variable empty to 1
  359. grid[0][9].type is an empty space, so set variable empty to 1
  360. grid[0][10].type is an empty space, so set variable empty to 1
  361. grid[0][11].type is an empty space, so set variable empty to 1
  362. grid[0][12].type is an empty space, so set variable empty to 1
  363. grid[0][13].type is an empty space, so set variable empty to 1
  364. grid[0][14].type is an empty space, so set variable empty to 1
  365. grid[0][15].type is an empty space, so set variable empty to 1
  366. grid[0][16].type is an empty space, so set variable empty to 1
  367. grid[0][17].type is an empty space, so set variable empty to 1
  368. grid[1][18].type is an empty space, so set variable empty to 1
  369. grid[2][19].type is an empty space, so set variable empty to 1
  370.  
  371. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement