{"id":136,"date":"2017-04-23T11:46:00","date_gmt":"2017-04-23T11:46:00","guid":{"rendered":"https:\/\/blogs.etsii.urjc.es\/dseytr\/?p=136"},"modified":"2020-11-22T10:51:56","modified_gmt":"2020-11-22T10:51:56","slug":"tetris-en-arduino","status":"publish","type":"post","link":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/","title":{"rendered":"Tetris en Arduino."},"content":{"rendered":"<p><\/p>\n<div style=\"text-align: right;\">\n<span style=\"color: #e69138;\"><span lang=\"ES-TRAD\" style=\"font-family: &quot;agency fb&quot; , sans-serif; font-size: 36pt; line-height: 115%;\">TETRINO \u2013 TETRIS EN ARDUINO<\/span><\/span><\/div>\n<div style=\"text-align: right;\">\n<\/div>\n<div style=\"text-align: right;\">\n<span lang=\"ES-TRAD\" style=\"color: #e9e5dc; font-family: &quot;agency fb&quot; , sans-serif; font-size: 36.0pt; line-height: 115%;\"><\/span><\/div>\n<h3 align=\"right\" style=\"text-align: right;\">\n<span style=\"color: #e69138;\"><span style=\"font-weight: normal;\"><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><span lang=\"ES-TRAD\" style=\"mso-ansi-language: ES-TRAD;\"><span style=\"mso-spacerun: yes;\">M\u00f3nica Pastor Abanades&nbsp;<\/span><\/span><\/span><\/span><\/span><\/span><\/h3>\n<h3 align=\"right\" style=\"text-align: right;\">\n<span style=\"color: #e69138;\"><span style=\"font-weight: normal;\"><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><span lang=\"ES-TRAD\" style=\"mso-ansi-language: ES-TRAD;\"><span style=\"mso-spacerun: yes;\">Lidia L\u00f3pez P\u00e9rez<\/span><\/span><\/span><\/span><\/span><\/span><\/h3>\n<h3 align=\"right\" style=\"text-align: right;\">\n<span style=\"color: #e69138;\"><span style=\"font-weight: normal;\"><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><span lang=\"ES-TRAD\" style=\"mso-ansi-language: ES-TRAD;\"><span style=\"mso-spacerun: yes;\">Doble Grado Ingenier\u00eda Inform\u00e1tica &#8211; ADE<\/span><\/span><\/span><\/span><\/span><\/span><\/h3>\n<h3 align=\"right\" style=\"text-align: right;\">\n<span lang=\"ES-TRAD\" style=\"mso-ansi-language: ES-TRAD;\"><span style=\"mso-spacerun: yes;\"><span style=\"color: #e69138;\"><span style=\"font-weight: normal;\"><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\">SEyRE &#8211; Vic\u00e1lvaro &#8211; 2017<\/span><\/span><\/span><\/span> <\/span><\/span><\/h3>\n<p><span style=\"font-size: x-small;\"><\/span><\/p>\n<h1>\n<span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span class=\"MsoBookTitle\"><span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">1. INTRODUCCI\u00d3N.<\/span><\/span><\/span><\/h1>\n<p><\/span><\/h1>\n<p><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\">Hemos decido recrear el m\u00edtico juego del Tetris con un Arduino y una pantalla.<\/p>\n<p> Sigue el funcionamiento cl\u00e1sico del Tetris, con un joystick se mueven las piezas hacia los lados, y con el curso hacia abajo bajan m\u00e1s deprisa. Pulsando el joystick la pieza gira 90 grados hacia la derecha, y as\u00ed puedes rotar la pieza las veces que desees.<\/p>\n<p> La pantalla cuenta con un bot\u00f3n reset con el que puedes finalizar una partida y comenzar otra nueva. Por otro lado, en la otra placa de Arduino, contamos con un buzzer que es el encargado de general la canci\u00f3n del Tetris como ambientaci\u00f3n al juego, pero cuenta con un bot\u00f3n de apagado por si nos gusta m\u00e1s el modo mute.<\/span><\/span><span style=\"font-size: x-small;\"><br \/>\n<\/span><br \/>\n<\/p>\n<div class=\"MsoNormal\">\n<span style=\"font-size: x-small;\"><\/span><\/div>\n<p><span style=\"font-size: x-small;\"><\/span><span style=\"font-size: x-small;\"><\/span><\/p>\n<h1>\n<span style=\"font-size: x-small;\"><span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span class=\"MsoBookTitle\"><span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">2. COMPONENTES Y COSTES<\/span><\/span><span style=\"font-size: small;\">.<\/span><\/span><\/h1>\n<p><\/span><\/span><\/h1>\n<p>\n<span style=\"font-size: x-small;\"><\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"MsoTable15Grid5DarkAccent1\" style=\"border-collapse: collapse; border: none; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184; width: 638px;\">\n<tbody>\n<tr style=\"height: 20.65pt; mso-yfti-firstrow: yes; mso-yfti-irow: -1; mso-yfti-lastfirstrow: yes;\">\n<td style=\"background: #D34817; border-right: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-bottom-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 5; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">COMPONENTE<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #D34817; border-bottom: solid white 1.0pt; border-left: none; border-right: none; border-top: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-bottom-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-bottom-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 1; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">CANTIDAD<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #D34817; border-left: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-bottom-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-right-alt: solid white .5pt; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 1; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">COSTE<\/span><\/b><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 20.65pt; mso-yfti-irow: 0;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">Pantalla<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">1<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">16 \u20ac<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 20.65pt; mso-yfti-irow: 1;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 4; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">Arduino<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">2<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">5,5 \u20ac<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 20.65pt; mso-yfti-irow: 2;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">Joystick<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">1<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">2,5 \u20ac<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 20.65pt; mso-yfti-irow: 3;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 4; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">Cables<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">Varios<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">1 \u20ac<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 20.65pt; mso-yfti-irow: 4;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">Zumbador<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">1<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">1 \u20ac<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 20.65pt; mso-yfti-irow: 5; mso-yfti-lastrow: yes;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 20.65pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 4; text-align: center;\">\n<b><span lang=\"EN-US\" style=\"color: white; font-family: &quot;calibri light&quot; , sans-serif; mso-themecolor: background1;\">TOTAL<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.5pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 20.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 159.55pt;\" width=\"213\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<b style=\"mso-bidi-font-weight: normal;\"><span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif;\">26 \u20ac<\/span><\/b><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/span><\/p>\n<div class=\"MsoNormal\">\n<span style=\"font-size: x-small;\"><br \/><\/span><\/div>\n<p><span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span class=\"MsoBookTitle\"><span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">3. FUNCIONAMIENTO<\/span><\/span><span style=\"font-size: small;\">.<\/span><\/span><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><\/span><\/span><br \/><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><\/span><\/span><\/h1>\n<p><\/span><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\">Para poder hacer uso de la pantalla usamos la librer\u00eda MCUFRIEND_kbv, usando los m\u00e9todos y variables que conten\u00eda y que eran necesarios para implementar el c\u00f3digo para el Tetris. Tras familiarizarnos con la librer\u00eda, y cambiando algunos m\u00e9todos para la visualizaci\u00f3n correcta de \u00e9sta, comenzamos el desarrollo de los m\u00e9todos en s\u00ed del juego. <\/p>\n<p>Tras a\u00f1adir el resto de librer\u00edas necesarias para su correcto funcionamiento, a\u00f1adimos las definiciones de los pines y tras ellos los colores que usaremos en la pantalla. <\/p>\n<p>Nuestras variables son la pantalla (tft), la matriz de piezas, que almacena las piezas cuando est\u00e1n paradas y es de 32 por 18, despu\u00e9s una variable de la posici\u00f3n x y otra de la posici\u00f3n y para saber en qu\u00e9 pixel estamos, y fila y columna que tambi\u00e9n son para situarnos, pero dentro de la matriz. El joystick cuenta con tres variables, una para el eje X, otra para el eje Y, y otra para cuando pulsamos el joystick y act\u00faa como bot\u00f3n. <\/p>\n<p>Tras ello llegan los m\u00e9todos. Antes de explicarlos es mejor comentar en qu\u00e9 nos hemos basado para generar estos m\u00e9todos. El funcionamiento b\u00e1sico es que nuestro Tetris contiene piezas que son matrices (de 4 por 4). Y la pantalla de juego (game) guarda las piezas cuando caen, es decir, cuando tienen una pieza debajo o el final de la pantalla. \u00c9sta es una matriz de ceros y unos, que tendr\u00e1 un uno cuando una parte de la pieza al caer ocupe ese espacio. <\/p>\n<p>As\u00ed, seg\u00fan las piezas van bajando, se muestran por pantalla gracias al m\u00e9todo draw, que pinta los p\u00edxeles de \u00e9sta por pantalla y a la vez se van borrando crear la animaci\u00f3n del movimiento de la pieza. Durante todo el proceso de bajar por la pantalla, van comprobando lo que hay en la matriz de paradas, y compar\u00e1ndolo con todas las filas de la pieza (dado que cada una ocupar\u00e1 diferente seg\u00fan el tipo o si est\u00e1 rotada etc) para ver si podemos seguir bajando o no. Una vez no podamos bajar m\u00e1s, porque encontremos el fondo o haya alguna pieza, se detiene y se coloca en la matriz de paradas. Para moverse hacia los lados y girar sigue el mismo procedimiento, comprueba si puede girar, o moverse, y si puede hacerlo lo hace, y en caso contrario se queda como est\u00e1. En estos casos internamente lo que hace es crear una copia de la pieza sin llegar a pintarla y se prueba a girarla o moverla, en caso de que chocase con algo no se podr\u00eda mover la pieza original y en caso contrario se realizar\u00eda. <\/p>\n<p>Pero, \u00bfcu\u00e1l es el objetivo del Tetris? Eliminar l\u00edneas. Una l\u00ednea debe desaparecer cuando una fila est\u00e9 rellena con 1\u2019s, por tanto, cada vez que colocamos una pieza, tenemos un m\u00e9todo que comprueba este hecho, y de ser as\u00ed, elimina las filas que est\u00e9n completas. Y el final del juego llega cuando una pieza desborda la matriz por arriba, momento en el que el juego termina y te informa de que has perdido. Despu\u00e9s de esto por defecto se reinicia el juego otra vez.<\/p>\n<p> Las piezas se almacenan en una matriz de piezas, que contiene los siete tipos de pieza que tenemos en el Tetris, y a cada una le asigna un color (siempre el mismo), y son elegidas de forma aleatoria.&nbsp;<\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"220\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png\" width=\"400\" \/><\/a><\/div>\n<p><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\">\u00bfQu\u00e9 m\u00e9todos hemos empleado para la implementaci\u00f3n? <\/p>\n<p>Hemos dividido los m\u00e9todos utilizados en est\u00e9ticos, que hacen cosas de dise\u00f1o, funcionales, que implementan lo b\u00e1sico del Tetris, comprobaci\u00f3n, que permiten -o no- hacer las cosas, principales, que son el motor del juego y configuraci\u00f3n.<\/span><\/span><\/p>\n<p><span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"MsoTable15Grid5DarkAccent1\" style=\"border-collapse: collapse; border: none; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;\">\n<tbody>\n<tr style=\"height: 17.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: -1; mso-yfti-lastfirstrow: yes;\">\n<td style=\"background: #D34817; border-right: none; border: solid white 1.0pt; height: 17.0pt; mso-background-themecolor: accent1; mso-border-bottom-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 5; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">TIPO<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #D34817; border-bottom: solid white 1.0pt; border-left: none; border-right: none; border-top: solid white 1.0pt; height: 17.0pt; mso-background-themecolor: accent1; mso-border-bottom-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-bottom-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 1; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">FUNCI\u00d3N<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #D34817; border-left: none; border: solid white 1.0pt; height: 17.0pt; mso-background-themecolor: accent1; mso-border-bottom-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-right-alt: solid white .5pt; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 1; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">EXPLICACI\u00d3N<\/span><\/b><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 51.95pt; mso-yfti-irow: 0;\">\n<td rowspan=\"7\" style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 51.95pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">EST\u00c9TICO<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 51.95pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">pantallaInicio<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 51.95pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Este<br \/>\n  m\u00e9todo simplemente muestra en la pantalla el mensaje \u201cTetris\u201d, actuando como<br \/>\n  p\u00e1gina de inicio.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 30.25pt; mso-yfti-irow: 1;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 30.25pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">dibujoInicial<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 30.25pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Crea el fondo de pantalla<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 39.35pt; mso-yfti-irow: 2;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 39.35pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">inicializarMatrizGame<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 39.35pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Rellena<br \/>\n  el interior (la matriz) con ceros, ya que no hay piezas a\u00fan.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 28.85pt; mso-yfti-irow: 3;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 28.85pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">reiniciarPantalla<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 28.85pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Elimina el contenido del interior de la matriz.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 70.15pt; mso-yfti-irow: 4;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 70.15pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">dibujarPantalla<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 70.15pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Crea la parte est\u00e1tica de la pantalla, es decir, crea<br \/>\n  los bordes, que delimitaran la zona de juego del Tetris y donde se muestra la<br \/>\n  siguiente pieza que vendr\u00e1.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 29.55pt; mso-yfti-irow: 5;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.55pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">mostrarMensajeFin<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.55pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Imprime un \u201cPerdiste\u201d al final del juego.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 35.85pt; mso-yfti-irow: 6;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 35.85pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">mostrarPiezaDespues<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 35.85pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Nos muestra, en la parte est\u00e1tica de arriba, la pieza<br \/>\n  siguiente.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 37.25pt; mso-yfti-irow: 7;\">\n<td rowspan=\"8\" style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 37.25pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 4; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">FUNCIONAL<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 37.25pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">draw<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 37.25pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Imprime por pantalla la pieza que reciba de argumento. <\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 26.05pt; mso-yfti-irow: 8;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 26.05pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">rotatePieza<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 26.05pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Gira la pieza 90\u00ba.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 34.45pt; mso-yfti-irow: 9;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 34.45pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">guardarPieza<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 34.45pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Guarda la pieza que acaba de caer en la matriz del juego, para que se<br \/>\n  integre en \u00e9sta.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 34.45pt; mso-yfti-irow: 10;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 34.45pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">drawGame<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 34.45pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Es el m\u00e9todo encargado de pintar la matriz del juego.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 35.2pt; mso-yfti-irow: 11;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 35.2pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">moverDerecha<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 35.2pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Mueve la pieza una posici\u00f3n a la derecha (si puede).<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 37.25pt; mso-yfti-irow: 12;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 37.25pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">moverIzquierda<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 37.25pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Mueve la pieza una posici\u00f3n a la izquierda (si puede).<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 25.35pt; mso-yfti-irow: 13;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 25.35pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">eliminarFilas<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 25.35pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Elimina las filas completas (todo a unos)<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 35.2pt; mso-yfti-irow: 14;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 35.2pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">finPartida<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 35.2pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Si hay una pieza en la primera fila de la matriz indica<br \/>\n  el final de juego.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 92.5pt; mso-yfti-irow: 15;\">\n<td style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 92.5pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 4; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">PRINCIPAL<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 92.5pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">inicioJuego<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 92.5pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Ser\u00eda nuestra funci\u00f3n \u201cprincipal\u201d, la que inicia la bajada de piezas, las<br \/>\n  va sacando, va mostrando cual va despu\u00e9s, las baja, lee el joystick para<br \/>\n  saber qu\u00e9 hacer con ellas, hace las comprobaciones, elimina las filas&#8230; En<br \/>\n  definitiva, el juego en s\u00ed.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 53.35pt; mso-yfti-irow: 16;\">\n<td rowspan=\"6\" style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 53.35pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">COMPROBACI\u00d3N<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 53.35pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">esCuadrado<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 53.35pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Esta funci\u00f3n comprueba si la pieza es el cuadrado, ya<br \/>\n  que esta pieza es especial y no rota, porque quedar\u00eda igual.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 56.15pt; mso-yfti-irow: 17;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 56.15pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">copiarPieza<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 56.15pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Hace una copia de la pieza. Esta copia se utiliza para hacer las<br \/>\n  comprobaciones a la hora de bajar, girar, moverse hacia los lados y rotar.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 52.65pt; mso-yfti-irow: 18;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 52.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">tocaSuelo<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 52.65pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Comprueba si la pieza toca el suelo u otra pieza que<br \/>\n  haya por abajo, para ver cuando tiene que detenerse. <\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 38.65pt; mso-yfti-irow: 19;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 38.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">tocaDerecha<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 38.65pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Comprueba si la pieza puede moverse o no a la derecha.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 40.75pt; mso-yfti-irow: 20;\">\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 40.75pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">tocaIzquierda<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 40.75pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Comprueba si la pieza puede moverse o no a la<br \/>\n  izquierda.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 30.95pt; mso-yfti-irow: 21;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 30.95pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">verSiPuedeRotar<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 30.95pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Comprueba si puede rotar la pieza. <\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 28.15pt; mso-yfti-irow: 22;\">\n<td rowspan=\"2\" style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 28.15pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">DEPURACI\u00d3N<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 28.15pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">printPieza<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 28.15pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Imprime los ceros y unos de la matriz de la pieza. <\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 27.45pt; mso-yfti-irow: 23;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 27.45pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">printGame<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 27.45pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Imprime los ceros y uno de la matriz del juego.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 41.45pt; mso-yfti-irow: 24;\">\n<td rowspan=\"2\" style=\"background: #D34817; border-top: none; border: solid white 1.0pt; height: 41.45pt; mso-background-themecolor: accent1; mso-border-alt: solid white .5pt; mso-border-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt;\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 68; text-align: center;\">\n<b><span style=\"color: white; font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES; mso-themecolor: background1;\">CONFIGURACI\u00d3N<\/span><\/b><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 41.45pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">setup<\/span><\/div>\n<\/td>\n<td style=\"background: #F4B29B; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 41.45pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-yfti-cnfc: 64;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Hace configuraciones iniciales de la pantalla y el<br \/>\n  joystick.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 79.9pt; mso-yfti-irow: 25; mso-yfti-lastrow: yes;\">\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 79.9pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 109.55pt;\" width=\"146\">\n<div align=\"center\" class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">loop<\/span><\/div>\n<\/td>\n<td style=\"background: #F9D8CD; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 79.9pt; mso-background-themecolor: accent1; mso-background-themetint: 51; mso-border-alt: solid white .5pt; mso-border-bottom-themecolor: background1; mso-border-left-alt: solid white .5pt; mso-border-left-themecolor: background1; mso-border-right-themecolor: background1; mso-border-themecolor: background1; mso-border-top-alt: solid white .5pt; mso-border-top-themecolor: background1; padding: 0cm 5.4pt 0cm 5.4pt; width: 234.55pt;\" width=\"313\">\n<div class=\"MsoNormal\" style=\"line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;\">\n<span style=\"font-family: &quot;Calibri Light&quot;,sans-serif; mso-ansi-language: ES;\">Se ponen los m\u00e9todos para realizar el juego completo. Pone la pantalla en<br \/>\n  negro, muestra la de inicio, dibuja la del juego, inicia la matriz, y luego<br \/>\n  da inicio al juego con la funci\u00f3n \u201cprincipal\u201d comentada anteriormente.<\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\">Ya hemos mencionado que la pantalla funciona gracias a su librer\u00eda. Pero siendo m\u00e1s concretos, el funcionamiento de la pantalla se basa en dibujar los pixeles correspondientes en cada momento para lo que sea que necesitemos. <\/p>\n<p> En cuanto al joystick, funciona gracias a la intensidad de corriente. Seg\u00fan te muevas en el eje X y en el eje Y, hacia un lado o hacia otro, obtenemos un voltaje diferente. Por lo tanto, actuamos en consecuencia a ese voltaje, movi\u00e9ndonos hacia un lado o hacia otro. Cuando deslizamos el joystick hacia abajo lo que hacemos es aumentar la velocidad a la que baja la pieza. Y cuando pulsamos el joystick, la pieza rota 90\u00ba.<\/p>\n<p>Para el funcionamiento del zumbador hemos utilizado un c\u00f3digo ya existente, que consiste en programar diferentes notas, y la duraci\u00f3n de \u00e9stas, para generar canciones con ellas, y en este caso hemos generado la m\u00fasica del Tetris.<\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: Verdana,sans-serif;\"><span style=\"font-size: xx-small;\"> <\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small;\"><br \/>\n<\/span><br \/>\n<\/p>\n<h1>\n<\/h1>\n<h1>\n<span style=\"font-size: x-small;\"><span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">4. ESQUEMA HARDWARE.<\/span><\/span><\/h1>\n<p><\/span><\/span><\/h1>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<span style=\"font-size: x-small;\"><a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image003.png\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"368\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image003.png\" width=\"640\" \/><\/a><\/span><\/div>\n<p><span style=\"font-size: x-small;\"><br \/>\n<\/span><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Como se puede observar, hemos tenido que utilizar dos arduinos. El motivo es la corriente que necesita la pantalla y el joystick, no pod\u00edamos utilizar pines de la pantalla puesto que se creaba ruido y el joystick no funcionaba correctamente. Por lo tanto, este se nutre de la corriente de un Arduino, que adem\u00e1s hemos a\u00f1adido un zumbador y la pantalla utiliza la del otro. <br \/>&nbsp;<\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Cabe destacar que, a simple vista, la pantalla acapara la mayor\u00eda de pines, y aunque es as\u00ed, hay muchos que pese a estar conectados, no son utilizados (por ejemplo la tarjeta SD que se permite usar en la pantalla, nosotras no la utilizamos etc). Los utilizados se pueden observar en el esquema de arriba. <\/span><\/span><span style=\"font-size: x-small;\"><\/span><\/p>\n<h1>\n<span style=\"font-size: x-small;\"><span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">5. CONSTRUCCI\u00d3N.<\/span><\/span><\/h1>\n<p><\/span><\/span><\/h1>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Nuestro proyecto no requiere un gran montaje hardware. Simplemente hay que encajar la pantalla con el Arduino. <\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image004-768x1024.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image004-768x1024.jpg\" width=\"240\" \/><\/a><a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image005.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image005.jpg\" width=\"180\" \/><\/a><a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image006.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image006.jpg\" width=\"180\" \/><\/a><\/div>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">La parte m\u00e1s complicada fue buscar los pines que la pantalla no utilizaba para poder utilizar el joystick. Una vez encontramos estos, los unimos mediante cables, como se puede observar en las im\u00e1genes. <\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image007.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image007.jpg\" width=\"240\" \/><\/a><\/div>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><br \/><\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Los cables negro naranja, blanco y ocre son los encargados del eje X, eje Y, y de la funci\u00f3n al pulsar el bot\u00f3n del joystick respectivamente.  <\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image008.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image008.jpg\" width=\"240\" \/><\/a><\/div>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><br \/><\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Por otro lado, el joystick se conect\u00f3 al otro Arduino, donde tambi\u00e9n conectamos el zumbador. Esta vez sin problemas de pines. <\/span><\/span><br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Tras la parte construida de electr\u00f3nica pasamos a la parte de la carcasa. La construcci\u00f3n es de madera, donde hemos atornillado los arduinos, el joystick y el zumbador junto al bot\u00f3n. <\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image009.png\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"199\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image009.png\" width=\"320\" \/><\/a><\/div>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><br \/><\/span><\/span><br \/>\n <br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Despu\u00e9s soldamos los cables que conectan el joystick con el arduino, y los que conectan el zumbador con el interruptor. <\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image010.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"240\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image010.jpg\" width=\"320\" \/><\/a><\/div>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><br \/><\/span><\/span><br \/>\n <br \/>\n<span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">Por \u00faltimo, construimos una tapa para ocultar la construcci\u00f3n, dejando a la vista tan solo el joystick, la pantalla, y el bot\u00f3n que sirve para apagar y encender el zumbador. Hemos agujereado la zona donde est\u00e1 el zumbador, para que simule un \u201caltavoz\u201d.<\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image011.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"240\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image011.jpg\" width=\"320\" \/><\/a><\/div>\n<p><\/p>\n<h1>\n<span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span class=\"MsoBookTitle\"><span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">6. PROBLEMAS ENCONTRADOS.<\/span><\/span><\/span><\/h1>\n<p><\/span><\/h1>\n<p><span style=\"font-size: x-small;\"><br \/>\n<\/span><span style=\"font-size: x-small;\"><br \/>\n<span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\">Durante el desarrollo de la pr\u00e1ctica hemos encontrado diversos problemas de los que podemos destacar:<br \/><b><br \/>&#8211; Refresh de la pantalla: <\/b>la pantalla ten\u00eda que actualizar constantemente su contenido para que se mostrase como las piezas bajaban, giraban, rotaban&#8230; \u00bfC\u00f3mo lo hac\u00eda? Actualizando el contenido. El problema es que actualizaba toda la pantalla, por lo que todo el rato la pantalla se borraba y se dibujaba, dando la sensaci\u00f3n de iba a saltos (v\u00e9ase foto a continuaci\u00f3n). La soluci\u00f3n que dimos a este problema es mantener fijas las cosas de las pantallas que no necesitaban cambios, y tan solo hacer refresh a la parte de la pantalla donde se muestran las piezas.&nbsp;<\/span><\/span><\/span><br \/>\n<span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><br \/><\/span><\/span><\/span><br \/>\n<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image012.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image012.jpg\" width=\"261\" \/><\/a><\/div>\n<p><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><br \/><b>&#8211; Rotaci\u00f3n correcta:<\/b> en un primer planteamiento del m\u00e9todo rotar, las piezas en lugar de rotar 90\u00ba en sentido horario, rotaban 180\u00ba. La soluci\u00f3n fue plantear las piezas en matrices, y pensar en qu\u00e9 direcci\u00f3n hab\u00eda que mover los unos que dibujaban la pieza, para que hicieran el giro correcto de 90\u00ba. Adem\u00e1s hab\u00eda piezas como el cuadrado que rotaban dando una sensaci\u00f3n extra\u00f1a (v\u00e9ase la foto a continuaci\u00f3n), por lo que \u00e9sta decidimos no rotarla. <\/span><\/span><\/span><br \/>\n<span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><\/span><\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image013.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image013.jpg\" width=\"185\" \/><\/a><\/div>\n<p><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><br \/><b><br \/>&#8211; Dibujar las piezas correctamente:<\/b> este fue uno de los problemas m\u00e1s complicados de solventar. El problema es que a veces las piezas se paraban donde no deb\u00edan, o que se integraban con una pieza que ya estuviera abajo ocupando su lugar en la matriz. El problema radicaba en los pixeles que estaban ocupando de la pantalla, en dibujar estos correctamente. El modo de solucionarlo fue pensando las dimensiones de la pantalla, y en concreto del rect\u00e1ngulo en el que \u00edbamos a desarrollar el juego. Esta zona la tuvimos que dividir en filas y columnas, y tras ello hacer coincidir los pixeles con el espacio que ocupaba cada pieza dentro de la matriz, para que se guardasen en el lugar correcto. <\/p>\n<p><b>&#8211; Detener las piezas:<\/b> relacionado con el problema anterior, surg\u00eda el problema de detener las piezas correctamente, ya fuera porque hab\u00eda una pieza por debajo que la impidiese bajar, o directamente el suelo (v\u00e9ase las fotos a continuaci\u00f3n). La soluci\u00f3n es que, en la matriz game se crea cuando la pieza est\u00e1 bajando, constantemente est\u00e1 comprobando las filas que hay por debajo, en las columnas en las que se encuentra, para tener seguro que puede seguir bajando, o detenerse en caso contrario. <br \/> <\/span><\/span><\/span><br \/>\n<span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><\/span><\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image014.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/image014.jpg\" width=\"220\" \/><\/a><\/div>\n<p><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><br \/><b><br \/>&#8211; Rotaci\u00f3n de las piezas:<\/b> a la hora de rotar las piezas, no solo rotaban incorrectamente, sino que a veces rotaban sin poder hacerlo, porque hubiera otra pieza o los l\u00edmites de la matriz. Para solucionarlo creamos una copia de la pieza, que, si rota, y se comprueba si entra en conflicto con los l\u00edmites u otra pieza, y en caso de no hacerlo, ya gira la pieza original.<\/span><\/span><\/span><br \/>\n<span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><br \/> <\/span><\/span><\/span><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><\/span><\/span><\/span><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/photo_2017-04-19_22-35-29-768x1024.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/photo_2017-04-19_22-35-29-768x1024.jpg\" width=\"240\" \/><\/a><\/div>\n<p><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><br \/> <\/span><\/span><\/span><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><\/span><\/span><\/span><br \/>\n<span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><span style=\"font-size: small;\"><b><br \/>&#8211; Tetris a la inversa:<\/b> un problema curioso es que, las cosas se mostraban al rev\u00e9s, como si se tratase de un espejo. No ten\u00eda ning\u00fan sentido, pero el problema estaba en la librer\u00eda, donde tras modificar algunas cosas, conseguimos que las cosas se vieran correctamente.<\/span><\/span><\/span><br \/>\n<span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><br \/><\/span><\/span><br \/>\n<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/photo_2017-04-08_01-03-39-768x1024.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"320\" src=\"https:\/\/blogs.etsii.urjc.es\/wp-content\/uploads\/sites\/8\/2017\/04\/photo_2017-04-08_01-03-39-768x1024.jpg\" width=\"240\" \/><\/a><\/div>\n<p><span style=\"font-size: x-small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\"><br \/><\/span><\/span><br \/>\n<\/p>\n<h1>\n<span style=\"font-size: x-small;\"><span style=\"color: #e69138;\"><span style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\"><span style=\"font-size: x-small;\"><\/p>\n<h1>\n<span style=\"color: #e69138;\"><span class=\"MsoBookTitle\"><span lang=\"EN-US\" style=\"font-family: &quot;calibri light&quot; , sans-serif; font-weight: normal;\">7. ANEXOS.<\/span><\/span><\/span><\/h1>\n<p><\/span><\/span><\/span><\/span><\/h1>\n<p><span style=\"font-size: small;\"><span style=\"font-family: &quot;verdana&quot; , sans-serif;\">&#8211; <a href=\"https:\/\/gitlab.com\/mpast\/Tetrino\">Enlace al c\u00f3digo en GitLab.<\/a><\/p>\n<p>&#8211; <a href=\"https:\/\/drive.google.com\/open?id=0B6d_brCD2vw0RV8xU0Q5aG8yZ2M\">Memoria (PDF).<\/a><\/p>\n<p>&#8211; <a href=\"https:\/\/drive.google.com\/open?id=0B6d_brCD2vw0Z01FTi1aQUlQVm8\">Presentaci\u00f3n.<\/a> <\/p>\n<p>&#8211; V\u00eddeo de la evoluci\u00f3n. <\/p>\n<p>&#8211; <a href=\"https:\/\/drive.google.com\/open?id=0B6d_brCD2vw0aFNsZ1lmYm5tY0E\">V\u00eddeo de demostraci\u00f3n.<\/a> <\/p>\n<p>  <\/span><\/span><\/p>\n<div style=\"text-align: right;\">\n<\/div>\n<div style=\"text-align: left;\">\n<\/div>\n<div style=\"text-align: right;\">\n<\/div>\n<div style=\"text-align: right;\">\n<\/div>\n<div style=\"text-align: right;\">\n<\/div>\n<div style=\"text-align: right;\">\n<\/div>\n<div style=\"text-align: right;\">\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>TETRINO \u2013 TETRIS EN ARDUINO M\u00f3nica Pastor Abanades&nbsp; Lidia L\u00f3pez P\u00e9rez Doble Grado Ingenier\u00eda Inform\u00e1tica &#8211; ADE SEyRE &#8211; Vic\u00e1lvaro &#8211; 2017 1. INTRODUCCI\u00d3N. Hemos decido recrear el m\u00edtico juego del Tetris con un&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1023,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[19],"class_list":["post-136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-proyectos","tag-seytr_gii_madrid_2016-17"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tetris en Arduino. - Proyectos con Arduino.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tetris en Arduino. - Proyectos con Arduino.\" \/>\n<meta property=\"og:description\" content=\"TETRINO \u2013 TETRIS EN ARDUINO M\u00f3nica Pastor Abanades&nbsp; Lidia L\u00f3pez P\u00e9rez Doble Grado Ingenier\u00eda Inform\u00e1tica &#8211; ADE SEyRE &#8211; Vic\u00e1lvaro &#8211; 2017 1. INTRODUCCI\u00d3N. Hemos decido recrear el m\u00edtico juego del Tetris con un&#046;&#046;&#046;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/\" \/>\n<meta property=\"og:site_name\" content=\"Proyectos con Arduino.\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-23T11:46:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-22T10:51:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png\" \/>\n\t<meta property=\"og:image:width\" content=\"776\" \/>\n\t<meta property=\"og:image:height\" content=\"427\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Administrador de la red\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Administrador de la red\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/\"},\"author\":{\"name\":\"Administrador de la red\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#\\\/schema\\\/person\\\/bdc38fea664f13638d2a51f4d2fc7211\"},\"headline\":\"Tetris en Arduino.\",\"datePublished\":\"2017-04-23T11:46:00+00:00\",\"dateModified\":\"2020-11-22T10:51:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/\"},\"wordCount\":2298,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2017\\\/04\\\/image002.png\",\"keywords\":[\"SEyTR_GII_Madrid_2016-17\"],\"articleSection\":[\"Proyectos\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/\",\"url\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/\",\"name\":\"Tetris en Arduino. - Proyectos con Arduino.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2017\\\/04\\\/image002.png\",\"datePublished\":\"2017-04-23T11:46:00+00:00\",\"dateModified\":\"2020-11-22T10:51:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2017\\\/04\\\/image002.png\",\"contentUrl\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2017\\\/04\\\/image002.png\",\"width\":776,\"height\":427},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/tetris-en-arduino\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tetris en Arduino.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#website\",\"url\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/\",\"name\":\"Proyectos con Arduino.\",\"description\":\"Blog de proyectos de Arduino de alumnos de la URJC\",\"publisher\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#organization\",\"name\":\"Universidad Rey Juan Carlos\",\"url\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2022\\\/05\\\/logourjc-1.jpg\",\"contentUrl\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2022\\\/05\\\/logourjc-1.jpg\",\"width\":745,\"height\":288,\"caption\":\"Universidad Rey Juan Carlos\"},\"image\":{\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/#\\\/schema\\\/person\\\/bdc38fea664f13638d2a51f4d2fc7211\",\"name\":\"Administrador de la red\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8e366128f81a82735b0b00fe6d280414b4bad087e380fa9fee9694454b8a6fa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8e366128f81a82735b0b00fe6d280414b4bad087e380fa9fee9694454b8a6fa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e8e366128f81a82735b0b00fe6d280414b4bad087e380fa9fee9694454b8a6fa?s=96&d=mm&r=g\",\"caption\":\"Administrador de la red\"},\"sameAs\":[\"https:\\\/\\\/blogs.etsii.urjc.es\"],\"url\":\"https:\\\/\\\/blogs.etsii.urjc.es\\\/dseytr\\\/author\\\/etsiiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tetris en Arduino. - Proyectos con Arduino.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/","og_locale":"es_ES","og_type":"article","og_title":"Tetris en Arduino. - Proyectos con Arduino.","og_description":"TETRINO \u2013 TETRIS EN ARDUINO M\u00f3nica Pastor Abanades&nbsp; Lidia L\u00f3pez P\u00e9rez Doble Grado Ingenier\u00eda Inform\u00e1tica &#8211; ADE SEyRE &#8211; Vic\u00e1lvaro &#8211; 2017 1. INTRODUCCI\u00d3N. Hemos decido recrear el m\u00edtico juego del Tetris con un&#46;&#46;&#46;","og_url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/","og_site_name":"Proyectos con Arduino.","article_published_time":"2017-04-23T11:46:00+00:00","article_modified_time":"2020-11-22T10:51:56+00:00","og_image":[{"width":776,"height":427,"url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png","type":"image\/png"}],"author":"Administrador de la red","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Administrador de la red","Tiempo de lectura":"11 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#article","isPartOf":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/"},"author":{"name":"Administrador de la red","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#\/schema\/person\/bdc38fea664f13638d2a51f4d2fc7211"},"headline":"Tetris en Arduino.","datePublished":"2017-04-23T11:46:00+00:00","dateModified":"2020-11-22T10:51:56+00:00","mainEntityOfPage":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/"},"wordCount":2298,"commentCount":0,"publisher":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#organization"},"image":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png","keywords":["SEyTR_GII_Madrid_2016-17"],"articleSection":["Proyectos"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/","url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/","name":"Tetris en Arduino. - Proyectos con Arduino.","isPartOf":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#primaryimage"},"image":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png","datePublished":"2017-04-23T11:46:00+00:00","dateModified":"2020-11-22T10:51:56+00:00","breadcrumb":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#primaryimage","url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png","contentUrl":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2017\/04\/image002.png","width":776,"height":427},{"@type":"BreadcrumbList","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/tetris-en-arduino\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/blogs.etsii.urjc.es\/dseytr\/"},{"@type":"ListItem","position":2,"name":"Tetris en Arduino."}]},{"@type":"WebSite","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#website","url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/","name":"Proyectos con Arduino.","description":"Blog de proyectos de Arduino de alumnos de la URJC","publisher":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogs.etsii.urjc.es\/dseytr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#organization","name":"Universidad Rey Juan Carlos","url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#\/schema\/logo\/image\/","url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2022\/05\/logourjc-1.jpg","contentUrl":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-content\/uploads\/sites\/8\/2022\/05\/logourjc-1.jpg","width":745,"height":288,"caption":"Universidad Rey Juan Carlos"},"image":{"@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/blogs.etsii.urjc.es\/dseytr\/#\/schema\/person\/bdc38fea664f13638d2a51f4d2fc7211","name":"Administrador de la red","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/e8e366128f81a82735b0b00fe6d280414b4bad087e380fa9fee9694454b8a6fa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e8e366128f81a82735b0b00fe6d280414b4bad087e380fa9fee9694454b8a6fa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e8e366128f81a82735b0b00fe6d280414b4bad087e380fa9fee9694454b8a6fa?s=96&d=mm&r=g","caption":"Administrador de la red"},"sameAs":["https:\/\/blogs.etsii.urjc.es"],"url":"https:\/\/blogs.etsii.urjc.es\/dseytr\/author\/etsiiadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":2,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":2812,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/posts\/136\/revisions\/2812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/media\/1023"}],"wp:attachment":[{"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.etsii.urjc.es\/dseytr\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}