Project tutorial
Arduino Hangman Game

Arduino Hangman Game

You can use a touchscreen display and an Arduino to make a fun and interactive hangman game.

  • 14 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

Youtube tutorial:

Notes:

The default screen size is 3.5 inches so if you have a different screen size you will need to adapt the dimensions in the code.

Notes for Downloading Code:

When downloading the code make a new sketch and add 6 new tabs and paste each sketch of the code into these tabs.​

Code

Arduino HangmanArduino
#include <Adafruit_GFX.h>
#include <Adafruit_TFTLCD.h>
#include <TouchScreen.h>

#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4

#define BLACK       0x0000
#define WHITE       0xFFFF
#define LIGHTGREY   0xC618

#define YP A2
#define XM A3
#define YM 8
#define XP 9

#define TS_MINX 130
#define TS_MAXX 905

#define TS_MINY 75
#define TS_MAXY 930

#define STATUS_X 10
#define STATUS_Y 65

#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

int Page_Number = 0;
int Limb_Number = 0;
String Real_Word;
String Guessed_Word;
String Last_Guessed_Word;
String Letter_Pressed;
int Last_Character_Checked;
bool A_Guessed = false;
bool B_Guessed = false;
bool C_Guessed = false;
bool D_Guessed = false;
bool E_Guessed = false;
bool F_Guessed = false;
bool G_Guessed = false;
bool H_Guessed = false;
bool I_Guessed = false;
bool J_Guessed = false;
bool K_Guessed = false;
bool L_Guessed = false;
bool M_Guessed = false;
bool N_Guessed = false;
bool O_Guessed = false; 
bool P_Guessed = false;
bool Q_Guessed = false;
bool R_Guessed = false;
bool S_Guessed = false;
bool T_Guessed = false;
bool U_Guessed = false;
bool V_Guessed = false;
bool W_Guessed = false;
bool X_Guessed = false;
bool Y_Guessed = false;
bool Z_Guessed = false;

void setup() {
  Serial.begin(9600);

  tft.reset();
  uint16_t identifier = tft.readID();
  tft.begin(identifier);
  tft.setRotation(0);

  Start_Page_Setup();
}

#define MINPRESSURE 10
#define MAXPRESSURE 1000


void loop() {
  if (Page_Number == 0) {
    Start_Page_Run();
  }
  if (Page_Number == 1) {
    Enter_Word_Page_Run();
  }
  if (Page_Number == 2) {
    Letter_Choosing_Page_Run();
  }
  if (Page_Number == 3) {
    Hangman_Display_Run();
  }
  if (Page_Number == 4) {
    Word_Display_Page_Run();
  }
  if (Page_Number == 5) {
    Final_Guess_Page_Run();
  }
}
Start PageArduino
void Start_Page_Setup() {
  tft.fillScreen(BLACK);
  tft.drawCircle(160, 70, 50, WHITE);
  tft.fillCircle(140, 50, 5, WHITE);
  tft.fillCircle(180, 50, 5, WHITE);
  tft.drawLine(140, 80, 180, 80, WHITE);
  tft.drawLine(140, 81, 180, 81, WHITE);
  tft.drawLine(140, 82, 180, 82, WHITE);
  tft.drawLine(160, 120, 160, 280, WHITE);
  tft.drawLine(160, 200, 100, 140, WHITE);
  tft.drawLine(160, 200, 220, 140, WHITE);
  tft.drawLine(160, 280, 100, 340, WHITE);
  tft.drawLine(160, 280, 220, 340, WHITE);
  tft.drawRect(20, 380, 280, 80, WHITE);
  tft.setCursor(50, 410);
  tft.setTextColor(WHITE);
  tft.setTextSize(3);
  tft.println("Play Hangman!");
}

void Start_Page_Run() {
  TSPoint p = ts.getPoint();

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 480, 0);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);

    if (p.x > 380 && p.x < 460 && p.y > 20 && p.y < 300)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Page_Number = 1;
      Enter_Word_Page_Setup();
      delay(300);
    }
  }
}
Enter Word PageArduino
void Enter_Word_Page_Setup() {
  tft.fillScreen(BLACK);
  tft.setCursor(30, 10);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Enter Word:");
  tft.drawRect(20, 50, 280, 2, WHITE);
  tft.drawRect(0, 180, 64, 50, WHITE);
  tft.setCursor(22, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("A");
  tft.drawRect(64, 180, 64, 50, WHITE);
  tft.setCursor(86, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("B");
  tft.drawRect(128, 180, 64, 50, WHITE);
  tft.setCursor(150, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("C");
  tft.drawRect(192, 180, 64, 50, WHITE);
  tft.setCursor(214, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("D");
  tft.drawRect(256, 180, 64, 50, WHITE);
  tft.setCursor(278, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("E");
  tft.drawRect(0, 230, 64, 50, WHITE);
  tft.setCursor(22, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("F");
  tft.drawRect(64, 230, 64, 50, WHITE);
  tft.setCursor(86, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("G");
  tft.drawRect(128, 230, 64, 50, WHITE);
  tft.setCursor(150, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("H");
  tft.drawRect(192, 230, 64, 50, WHITE);
  tft.setCursor(214, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("I");
  tft.drawRect(256, 230, 64, 50, WHITE);
  tft.setCursor(278, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("J");
  tft.drawRect(0, 280, 64, 50, WHITE);
  tft.setCursor(22, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("K");
  tft.drawRect(64, 280, 64, 50, WHITE);
  tft.setCursor(86, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("L");
  tft.drawRect(128, 280, 64, 50, WHITE);
  tft.setCursor(150, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("M");
  tft.drawRect(192, 280, 64, 50, WHITE);
  tft.setCursor(214, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("N");
  tft.drawRect(256, 280, 64, 50, WHITE);
  tft.setCursor(278, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("O");
  tft.drawRect(0, 330, 64, 50, WHITE);
  tft.setCursor(22, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("P");
  tft.drawRect(64, 330, 64, 50, WHITE);
  tft.setCursor(86, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Q");
  tft.drawRect(128, 330, 64, 50, WHITE);
  tft.setCursor(150, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("R");
  tft.drawRect(192, 330, 64, 50, WHITE);
  tft.setCursor(214, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("S");
  tft.drawRect(256, 330, 64, 50, WHITE);
  tft.setCursor(278, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("T");
  tft.drawRect(0, 380, 64, 50, WHITE);
  tft.setCursor(22, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("U");
  tft.drawRect(64, 380, 64, 50, WHITE);
  tft.setCursor(86, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("V");
  tft.drawRect(128, 380, 64, 50, WHITE);
  tft.setCursor(150, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("W");
  tft.drawRect(192, 380, 64, 50, WHITE);
  tft.setCursor(214, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("X");
  tft.drawRect(256, 380, 64, 50, WHITE);
  tft.setCursor(278, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Y");
  tft.drawRect(0, 430, 64, 50, WHITE);
  tft.setCursor(22, 440);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Z");
  tft.drawRect(64, 430, 64, 50, WHITE);
  tft.setCursor(80, 448);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.println("DEL");
  tft.drawRect(128, 430, 128, 50, WHITE);
  tft.setCursor(147 , 445);
  tft.setTextColor(WHITE);
  tft.setTextSize(3);
  tft.println("SPACE");
  tft.drawRect(256, 430, 64, 50, WHITE);
  tft.setCursor(265, 448);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.println("NEXT");
}

void Enter_Word_Page_Run() {
  TSPoint p = ts.getPoint();

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 480, 0);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);

    if (p.x > 180 && p.x < 230 && p.y > 0 && p.y < 64 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "A";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 64 && p.y < 128 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "B";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 128 && p.y < 192 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "C";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 192 && p.y < 256 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "D";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 256 && p.y < 320 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "E";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 0 && p.y < 64 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "F";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 64 && p.y < 128 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "G";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 128 && p.y < 192 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "H";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 192 && p.y < 256 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "I";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 256 && p.y < 320 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "J";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 0 && p.y < 64 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "K";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 64 && p.y < 128 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "L";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 128 && p.y < 192 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "M";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 192 && p.y < 256 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "N";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 256 && p.y < 320 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "O";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 0 && p.y < 64 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "P";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 64 && p.y < 128 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "Q";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 128 && p.y < 192 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "R";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 192 && p.y < 256 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "S";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 256 && p.y < 320 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "T";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 0 && p.y < 64 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "U";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 64 && p.y < 128 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "V";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 128 && p.y < 192 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "W";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 192 && p.y < 256 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "X";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 256 && p.y < 320 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "Y";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 430 && p.x < 480 && p.y > 0 && p.y < 64 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + "Z";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 430 && p.x < 480 && p.y > 64 && p.y < 128 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      tft.setCursor(0, 60);
      tft.setTextColor(BLACK );
      tft.setTextSize(4);
      tft.println(Real_Word);
      Real_Word.remove(Real_Word.length() - 1);
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);

    }
    if (p.x > 430 && p.x < 480 && p.y > 128 && p.y < 256 && Real_Word.length() < 39)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Real_Word = Real_Word + " ";
      tft.setCursor(0, 60);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Real_Word);
      delay(300);
    }
    if (p.x > 430 && p.x < 480 && p.y > 256 && p.y < 320)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      while (Real_Word.length() != Guessed_Word.length()) {
        Guessed_Word = Guessed_Word + "_";
      }

      Letter_Pressed = " ";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
      }

      Page_Number = 2;
      Letter_Choosing_Page_Setup();

      delay(300);
    }
  }
}
Letter Choosing PageArduino
void Letter_Choosing_Page_Setup() {
  tft.fillScreen(BLACK);
  tft.setCursor(5, 10);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Guess Letter:");
  tft.drawRect(5, 50, 310, 2, WHITE);
  if (A_Guessed == true) {
    tft.fillRect(12.8, 60, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 60, 64, 50, WHITE);
  tft.setCursor(34.8, 70);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("A");
  if (B_Guessed == true) {
    tft.fillRect(89.6, 60, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 60, 64, 50, WHITE);
  tft.setCursor(111.6, 70);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("B");
  if (C_Guessed == true) {
    tft.fillRect(166.4, 60, 64, 50, LIGHTGREY);
  }
  tft.drawRect(166.4, 60, 64, 50, WHITE);
  tft.setCursor(188.4, 70);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("C");
  if (D_Guessed == true) {
    tft.fillRect(243.2, 60, 64, 50, LIGHTGREY);
  }
  tft.drawRect(243.2, 60, 64, 50, WHITE);
  tft.setCursor(265.2, 70);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("D");
  if (E_Guessed == true) {
    tft.fillRect(12.8, 120, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 120, 64, 50, WHITE);
  tft.setCursor(34.8, 130);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("E");
  if (F_Guessed == true) {
    tft.fillRect(89.6, 120, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 120, 64, 50, WHITE);
  tft.setCursor(111.6, 130);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("F");
  if (G_Guessed == true) {
    tft.fillRect(166.4, 120, 64, 50, LIGHTGREY);
  }
  tft.drawRect(166.4, 120, 64, 50, WHITE);
  tft.setCursor(188.4, 130);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("G");
  if (H_Guessed == true) {
    tft.fillRect(243.2, 120, 64, 50, LIGHTGREY);
  }
  tft.drawRect(243.2, 120, 64, 50, WHITE);
  tft.setCursor(265.2, 130);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("H");
  if (I_Guessed == true) {
    tft.fillRect(12.8, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 180, 64, 50, WHITE);
  tft.setCursor(34.8, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("I");
  if (J_Guessed == true) {
    tft.fillRect(89.6, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 180, 64, 50, WHITE);
  tft.setCursor(111.6, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("J");
  if (K_Guessed == true) {
    tft.fillRect(166.4, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(166.4, 180, 64, 50, WHITE);
  tft.setCursor(188.4, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("K");
  if (L_Guessed == true) {
    tft.fillRect(243.2, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(243.2, 180, 64, 50, WHITE);
  tft.setCursor(265.2, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("L");
  if (M_Guessed == true) {
    tft.fillRect(12.8, 240, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 240, 64, 50, WHITE);
  tft.setCursor(34.8, 250);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("M");
  if (N_Guessed == true) {
    tft.fillRect(89.6, 240, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 240, 64, 50, WHITE);
  tft.setCursor(111.6, 250);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("N");
  if (O_Guessed == true) {
    tft.fillRect(166.4, 240, 64, 50, LIGHTGREY);
  }
  tft.drawRect(166.4, 240, 64, 50, WHITE);
  tft.setCursor(188.4, 250);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("O");
  if (P_Guessed == true) {
    tft.fillRect(243.2, 240, 64, 50, LIGHTGREY);
  }
  tft.drawRect(243.2, 240, 64, 50, WHITE);
  tft.setCursor(265.2, 250);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("P");
  if (Q_Guessed == true) {
    tft.fillRect(12.8, 300, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 300, 64, 50, WHITE);
  tft.setCursor(34.8, 310);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Q");
  if (R_Guessed == true) {
    tft.fillRect(89.6, 300, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 300, 64, 50, WHITE);
  tft.setCursor(111.6, 310);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("R");
  if (S_Guessed == true) {
    tft.fillRect(166.4, 300, 64, 50, LIGHTGREY);
  }
  tft.drawRect(166.4, 300, 64, 50, WHITE);
  tft.setCursor(188.4, 310);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("S");
  if (T_Guessed == true) {
    tft.fillRect(243.2, 300, 64, 50, LIGHTGREY);
  }
  tft.drawRect(243.2, 300, 64, 50, WHITE);
  tft.setCursor(265.2, 310);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("T");
  if (U_Guessed == true) {
    tft.fillRect(12.8, 360, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 360, 64, 50, WHITE);
  tft.setCursor(34.8, 370);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("U");
  if (V_Guessed == true) {
    tft.fillRect(89.6, 360, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 360, 64, 50, WHITE);
  tft.setCursor(111.6, 370);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("V");
  if (W_Guessed == true) {
    tft.fillRect(166.4, 360, 64, 50, LIGHTGREY);
  }
  tft.drawRect(166.4, 360, 64, 50, WHITE);
  tft.setCursor(188.4, 370);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("W");
  if (X_Guessed == true) {
    tft.fillRect(243.2, 360, 64, 50, LIGHTGREY);
  }
  tft.drawRect(243.2, 360, 64, 50, WHITE);
  tft.setCursor(265.2, 370);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("X");
  if (Y_Guessed == true) {
    tft.fillRect(12.8, 420, 64, 50, LIGHTGREY);
  }
  tft.drawRect(12.8, 420, 64, 50, WHITE);
  tft.setCursor(34.8, 430);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Y");
  if (Z_Guessed == true) {
    tft.fillRect(89.6, 420, 64, 50, LIGHTGREY);
  }
  tft.drawRect(89.6, 420, 64, 50, WHITE);
  tft.setCursor(111.6, 430);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Z");
  tft.drawRect(166.4, 420, 140.8, 50, WHITE);
  tft.setCursor(175.4, 438);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.println("Guess Word");
}

void Letter_Choosing_Page_Run() {
  TSPoint p = ts.getPoint();

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 480, 0);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);

    if (p.x > 60 && p.x < 110 && p.y > 12.8 && p.y < 76.8 && A_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      A_Guessed = true;
      Letter_Pressed = "A";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 60 && p.x < 110 && p.y > 89.6 && p.y < 153.6 && B_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      B_Guessed = true;
      Letter_Pressed = "B";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 60 && p.x < 110 && p.y > 166.4 && p.y < 230.4 && C_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      C_Guessed = true;
      Letter_Pressed = "C";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 60 && p.x < 110 && p.y > 243.2 && p.y < 307.2 && D_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      D_Guessed = true;
      Letter_Pressed = "D";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 120 && p.x < 170 && p.y > 12.8 && p.y < 76.8 && E_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      E_Guessed = true;
      Letter_Pressed = "E";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 120 && p.x < 170 && p.y > 89.6 && p.y < 153.6 && F_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      F_Guessed = true;
      Letter_Pressed = "F";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 120 && p.x < 170 && p.y > 166.4 && p.y < 230.4 && G_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      G_Guessed = true;
      Letter_Pressed = "G";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 120 && p.x < 170 && p.y > 243.2 && p.y < 307.2 && H_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      H_Guessed = true;
      Letter_Pressed = "H";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 180 && p.x < 230 && p.y > 12.8 && p.y < 76.8 && I_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      I_Guessed = true;
      Letter_Pressed = "I";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 180 && p.x < 230 && p.y > 89.6 && p.y < 153.6 && J_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      J_Guessed = true;
      Letter_Pressed = "J";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 180 && p.x < 230 && p.y > 166.4 && p.y < 230.4 && K_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      K_Guessed = true;
      Letter_Pressed = "K";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 180 && p.x < 230 && p.y > 243.2 && p.y < 307.2 && L_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      L_Guessed = true;
      Letter_Pressed = "L";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 240 && p.x < 290 && p.y > 12.8 && p.y < 76.8 && M_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      M_Guessed = true;
      Letter_Pressed = "M";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 240 && p.x < 290 && p.y > 89.6 && p.y < 153.6 && N_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      N_Guessed = true;
      Letter_Pressed = "N";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 240 && p.x < 290 && p.y > 166.4 && p.y < 230.4 && O_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      O_Guessed = true;
      Letter_Pressed = "O";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 240 && p.x < 290 && p.y > 243.2 && p.y < 307.2 && P_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      P_Guessed = true;
      Letter_Pressed = "P";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 300 && p.x < 350 && p.y > 12.8 && p.y < 76.8 && Q_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Q_Guessed = true;
      Letter_Pressed = "Q";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 300 && p.x < 350 && p.y > 89.6 && p.y < 153.6 && R_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      R_Guessed = true;
      Letter_Pressed = "R";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 300 && p.x < 350 && p.y > 166.4 && p.y < 230.4 && S_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      S_Guessed = true;
      Letter_Pressed = "S";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 300 && p.x < 350 && p.y > 243.2 && p.y < 307.2 && T_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      T_Guessed = true;
      Letter_Pressed = "T";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 360 && p.x < 410 && p.y > 12.8 && p.y < 76.8 && U_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      U_Guessed = true;
      Letter_Pressed = "U";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 360 && p.x < 410 && p.y > 89.6 && p.y < 153.6 && V_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      V_Guessed = true;
      Letter_Pressed = "V";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 360 && p.x < 410 && p.y > 166.4 && p.y < 230.4 && W_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      W_Guessed = true;
      Letter_Pressed = "W";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 360 && p.x < 410 && p.y > 243.2 && p.y < 307.2 && X_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      X_Guessed = true;
      Letter_Pressed = "X";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 420 && p.x < 470 && p.y > 12.8 && p.y < 76.8 && Y_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Y_Guessed = true;
      Letter_Pressed = "Y";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 420 && p.x < 470 && p.y > 89.6 && p.y < 153.6 && Z_Guessed == false)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Z_Guessed = true;
      Letter_Pressed = "Z";

      if (Real_Word.indexOf(Letter_Pressed) != -1) {
        Last_Character_Checked = 0;
        do {
          Guessed_Word = Guessed_Word.substring(0, Real_Word.indexOf(Letter_Pressed, Last_Character_Checked)) + Letter_Pressed + Guessed_Word.substring(Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1);
          Last_Character_Checked = Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) + 1;
        } while (Real_Word.indexOf(Letter_Pressed, Last_Character_Checked) != -1);
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = Limb_Number + 1;
        Page_Number = 3;
        Hangman_Display_Setup();
      }
      delay(300);
    }

    if (p.x > 420 && p.x < 470 && p.y > 166.4 && p.y < 307.2)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Page_Number = 5;
      Final_Guess_Page_Setup();

      delay(300);
    }
  }
}
Hangman Display PageArduino
void Hangman_Display_Setup() {
  if (Limb_Number == 1) {
    tft.fillScreen(BLACK);
    tft.drawCircle(160, 70, 50, WHITE);
    tft.fillCircle(140, 50, 5, WHITE);
    tft.fillCircle(180, 50, 5, WHITE);
    tft.drawLine(140, 80, 180, 80, WHITE);
    tft.drawLine(140, 81, 180, 81, WHITE);
    tft.drawLine(140, 82, 180, 82, WHITE);

    tft.drawRect(240, 40, 64, 50, WHITE);
    tft.setCursor(262, 50);
    tft.setTextColor(WHITE);
    tft.setTextSize(4);
    tft.println(Letter_Pressed);
    tft.drawLine(229, 30, 313, 100, WHITE);
    tft.drawLine(230, 30, 314, 100, WHITE);
    tft.drawLine(231, 30, 315, 100, WHITE);
    tft.drawLine(313, 30, 229, 100, WHITE);
    tft.drawLine(314, 30, 230, 100, WHITE);
    tft.drawLine(315, 30, 231, 100, WHITE);

    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(35, 412);
    tft.setTextColor(WHITE);
    tft.setTextSize(2);
    tft.println("Choose Another Letter");
  }

  if (Limb_Number == 2) {
    tft.fillScreen(BLACK);
    tft.drawCircle(160, 70, 50, WHITE);
    tft.fillCircle(140, 50, 5, WHITE);
    tft.fillCircle(180, 50, 5, WHITE);
    tft.drawLine(140, 80, 180, 80, WHITE);
    tft.drawLine(140, 81, 180, 81, WHITE);
    tft.drawLine(140, 82, 180, 82, WHITE);

    tft.drawRect(240, 40, 64, 50, WHITE);
    tft.setCursor(262, 50);
    tft.setTextColor(WHITE);
    tft.setTextSize(4);
    tft.println(Letter_Pressed);
    tft.drawLine(229, 30, 313, 100, WHITE);
    tft.drawLine(230, 30, 314, 100, WHITE);
    tft.drawLine(231, 30, 315, 100, WHITE);
    tft.drawLine(313, 30, 229, 100, WHITE);
    tft.drawLine(314, 30, 230, 100, WHITE);
    tft.drawLine(315, 30, 231, 100, WHITE);

    tft.drawLine(160, 120, 160, 280, WHITE);

    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(35, 412);
    tft.setTextColor(WHITE);
    tft.setTextSize(2);
    tft.println("Choose Another Letter");
  }

  if (Limb_Number == 3) {
    tft.fillScreen(BLACK);
    tft.drawCircle(160, 70, 50, WHITE);
    tft.fillCircle(140, 50, 5, WHITE);
    tft.fillCircle(180, 50, 5, WHITE);
    tft.drawLine(140, 80, 180, 80, WHITE);
    tft.drawLine(140, 81, 180, 81, WHITE);
    tft.drawLine(140, 82, 180, 82, WHITE);

    tft.drawRect(240, 40, 64, 50, WHITE);
    tft.setCursor(262, 50);
    tft.setTextColor(WHITE);
    tft.setTextSize(4);
    tft.println(Letter_Pressed);
    tft.drawLine(229, 30, 313, 100, WHITE);
    tft.drawLine(230, 30, 314, 100, WHITE);
    tft.drawLine(231, 30, 315, 100, WHITE);
    tft.drawLine(313, 30, 229, 100, WHITE);
    tft.drawLine(314, 30, 230, 100, WHITE);
    tft.drawLine(315, 30, 231, 100, WHITE);

    tft.drawLine(160, 120, 160, 280, WHITE);
    tft.drawLine(160, 200, 100, 140, WHITE);

    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(35, 412);
    tft.setTextColor(WHITE);
    tft.setTextSize(2);
    tft.println("Choose Another Letter");
  }

  if (Limb_Number == 4) {
    tft.fillScreen(BLACK);
    tft.drawCircle(160, 70, 50, WHITE);
    tft.fillCircle(140, 50, 5, WHITE);
    tft.fillCircle(180, 50, 5, WHITE);
    tft.drawLine(140, 80, 180, 80, WHITE);
    tft.drawLine(140, 81, 180, 81, WHITE);
    tft.drawLine(140, 82, 180, 82, WHITE);

    tft.drawRect(240, 40, 64, 50, WHITE);
    tft.setCursor(262, 50);
    tft.setTextColor(WHITE);
    tft.setTextSize(4);
    tft.println(Letter_Pressed);
    tft.drawLine(229, 30, 313, 100, WHITE);
    tft.drawLine(230, 30, 314, 100, WHITE);
    tft.drawLine(231, 30, 315, 100, WHITE);
    tft.drawLine(313, 30, 229, 100, WHITE);
    tft.drawLine(314, 30, 230, 100, WHITE);
    tft.drawLine(315, 30, 231, 100, WHITE);

    tft.drawLine(160, 120, 160, 280, WHITE);
    tft.drawLine(160, 200, 100, 140, WHITE);
    tft.drawLine(160, 200, 220, 140, WHITE);

    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(35, 412);
    tft.setTextColor(WHITE);
    tft.setTextSize(2);
    tft.println("Choose Another Letter");
  }

  if (Limb_Number == 5) {
    tft.fillScreen(BLACK);
    tft.drawCircle(160, 70, 50, WHITE);
    tft.fillCircle(140, 50, 5, WHITE);
    tft.fillCircle(180, 50, 5, WHITE);
    tft.drawLine(140, 80, 180, 80, WHITE);
    tft.drawLine(140, 81, 180, 81, WHITE);
    tft.drawLine(140, 82, 180, 82, WHITE);

    tft.drawRect(240, 40, 64, 50, WHITE);
    tft.setCursor(262, 50);
    tft.setTextColor(WHITE);
    tft.setTextSize(4);
    tft.println(Letter_Pressed);
    tft.drawLine(229, 30, 313, 100, WHITE);
    tft.drawLine(230, 30, 314, 100, WHITE);
    tft.drawLine(231, 30, 315, 100, WHITE);
    tft.drawLine(313, 30, 229, 100, WHITE);
    tft.drawLine(314, 30, 230, 100, WHITE);
    tft.drawLine(315, 30, 231, 100, WHITE);

    tft.drawLine(160, 120, 160, 280, WHITE);
    tft.drawLine(160, 200, 100, 140, WHITE);
    tft.drawLine(160, 200, 220, 140, WHITE);
    tft.drawLine(160, 280, 100, 340, WHITE);

    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(35, 412);
    tft.setTextColor(WHITE);
    tft.setTextSize(2);
    tft.println("Choose Another Letter");
  }

  if (Limb_Number == 6) {
    tft.fillScreen(BLACK);
    tft.drawCircle(160, 70, 50, WHITE);
    tft.fillCircle(140, 50, 5, WHITE);
    tft.fillCircle(180, 50, 5, WHITE);
    tft.drawLine(140, 80, 180, 80, WHITE);
    tft.drawLine(140, 81, 180, 81, WHITE);
    tft.drawLine(140, 82, 180, 82, WHITE);

    if (Guessed_Word.indexOf("_") != -1) {
      tft.drawRect(240, 40, 64, 50, WHITE);
      tft.setCursor(262, 50);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Letter_Pressed);

      tft.drawLine(229, 30, 313, 100, WHITE);
      tft.drawLine(230, 30, 314, 100, WHITE);
      tft.drawLine(231, 30, 315, 100, WHITE);
      tft.drawLine(313, 30, 229, 100, WHITE);
      tft.drawLine(314, 30, 230, 100, WHITE);
      tft.drawLine(315, 30, 231, 100, WHITE);
    }

    tft.drawLine(160, 120, 160, 280, WHITE);
    tft.drawLine(160, 200, 100, 140, WHITE);
    tft.drawLine(160, 200, 220, 140, WHITE);
    tft.drawLine(160, 280, 100, 340, WHITE);
    tft.drawLine(160, 280, 220, 340, WHITE);

    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(70, 410);
    tft.setTextColor(WHITE);
    tft.setTextSize(3);
    tft.println("Play Again");
  }
}

void Hangman_Display_Run() {
  TSPoint p = ts.getPoint();

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 480, 0);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);

    if (p.x > 380 && p.x < 460 && p.y > 20 && p.y < 300 && Limb_Number != 6)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Page_Number = 2;
      Letter_Choosing_Page_Setup();

      delay(300);
    }
    if (p.x > 380 && p.x < 460 && p.y > 20 && p.y < 300 && Limb_Number == 6)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Start_Page_Setup();

      Page_Number = 0;
      Limb_Number = 0;
      Real_Word = "";
      Guessed_Word = "";
      Letter_Pressed = "";
      Last_Character_Checked = "";
      A_Guessed = false;
      B_Guessed = false;
      C_Guessed = false;
      D_Guessed = false;
      E_Guessed = false;
      F_Guessed = false;
      G_Guessed = false;
      H_Guessed = false;
      I_Guessed = false;
      J_Guessed = false;
      K_Guessed = false;
      L_Guessed = false;
      M_Guessed = false;
      N_Guessed = false;
      O_Guessed = false;
      P_Guessed = false;
      Q_Guessed = false;
      R_Guessed = false;
      S_Guessed = false;
      T_Guessed = false;
      U_Guessed = false;
      V_Guessed = false;
      W_Guessed = false;
      X_Guessed = false;
      Y_Guessed = false;
      Z_Guessed = false;

      delay(300);
    }
  }
}
Word Display PageArduino
void Word_Display_Page_Setup() {
  tft.fillScreen(BLACK);
  tft.setCursor(0, 10);
  tft.setTextColor(WHITE);
  tft.setTextSize(5);
  tft.println(Guessed_Word);
  if (Real_Word != Guessed_Word) {
    tft.drawRect(20, 270, 280, 80, WHITE);
    tft.setCursor(63, 300);
    tft.setTextColor(WHITE);
    tft.setTextSize(3);
    tft.println("Guess Again");
    tft.drawRect(20, 380, 280, 80, WHITE);
    tft.setCursor(72, 410);
    tft.setTextColor(WHITE);
    tft.setTextSize(3);
    tft.println("Guess Word");
  }
  else {
    tft.drawRect(20, 270, 280, 190, WHITE);
    tft.setCursor(90, 300);
    tft.setTextColor(WHITE);
    tft.setTextSize(8);
    tft.println("You");
    tft.setCursor(90, 380);
    tft.setTextColor(WHITE);
    tft.setTextSize(8); 
    tft.println("Won");
    delay(10000);

    Start_Page_Setup();

    Page_Number = 0;
    Limb_Number = 0;
    Real_Word = "";
    Guessed_Word = "";
    Letter_Pressed = "";
    Last_Character_Checked = "";
    A_Guessed = false;
    B_Guessed = false;
    C_Guessed = false;
    D_Guessed = false;
    E_Guessed = false;
    F_Guessed = false;
    G_Guessed = false;
    H_Guessed = false;
    I_Guessed = false;
    J_Guessed = false;
    K_Guessed = false;
    L_Guessed = false;
    M_Guessed = false;
    N_Guessed = false;
    O_Guessed = false;
    P_Guessed = false;
    Q_Guessed = false;
    R_Guessed = false;
    S_Guessed = false;
    T_Guessed = false;
    U_Guessed = false;
    V_Guessed = false;
    W_Guessed = false;
    X_Guessed = false;
    Y_Guessed = false;
    Z_Guessed = false;
  }
}

void Word_Display_Page_Run() {
  TSPoint p = ts.getPoint();

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 480, 0);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);

    if (p.x > 270 && p.x < 350 && p.y > 20 && p.y < 300 && Real_Word != Guessed_Word)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Page_Number = 2;
      Letter_Choosing_Page_Setup();
      delay(300);
    }

    if (p.x > 380 && p.x < 460 && p.y > 20 && p.y < 300 && Real_Word != Guessed_Word)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);
      Page_Number = 5;
      Final_Guess_Page_Setup();
      delay(300);
    }
  }
}
Final Guess PageArduino
void Final_Guess_Page_Setup() {
  tft.fillScreen(BLACK);
  tft.setCursor(0, 10);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println(Guessed_Word);
  if (A_Guessed == true) {
    tft.fillRect(0, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(0, 180, 64, 50, WHITE);
  tft.setCursor(22, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("A");
  if (B_Guessed == true) {
    tft.fillRect(64, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(64, 180, 64, 50, WHITE);
  tft.setCursor(86, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("B");
  if (C_Guessed == true) {
    tft.fillRect(128, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(128, 180, 64, 50, WHITE);
  tft.setCursor(150, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("C");
  if (D_Guessed == true) {
    tft.fillRect(192, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(192, 180, 64, 50, WHITE);
  tft.setCursor(214, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("D");
  if (E_Guessed == true) {
    tft.fillRect(256, 180, 64, 50, LIGHTGREY);
  }
  tft.drawRect(256, 180, 64, 50, WHITE);
  tft.setCursor(278, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("E");
  if (F_Guessed == true) {
    tft.fillRect(0, 230, 64, 50, LIGHTGREY);
  }
  tft.drawRect(0, 230, 64, 50, WHITE);
  tft.setCursor(22, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("F");
  if (G_Guessed == true) {
    tft.fillRect(64, 230, 64, 50, LIGHTGREY);
  }
  tft.drawRect(64, 230, 64, 50, WHITE);
  tft.setCursor(86, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("G");
  if (H_Guessed == true) {
    tft.fillRect(128, 230, 64, 50, LIGHTGREY);
  }
  tft.drawRect(128, 230, 64, 50, WHITE);
  tft.setCursor(150, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("H");
  if (I_Guessed == true) {
    tft.fillRect(192, 230, 64, 50, LIGHTGREY);
  }
  tft.drawRect(192, 230, 64, 50, WHITE);
  tft.setCursor(214, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("I");
  if (J_Guessed == true) {
    tft.drawRect(256, 230, 64, 50, LIGHTGREY);
  }
  tft.drawRect(256, 230, 64, 50, WHITE);
  tft.setCursor(278, 240);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("J");
  if (K_Guessed == true) {
    tft.fillRect(0, 280, 64, 50, LIGHTGREY);
  }
  tft.drawRect(0, 280, 64, 50, WHITE);
  tft.setCursor(22, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("K");
  if (L_Guessed == true) {
    tft.fillRect(64, 280, 64, 50, LIGHTGREY);
  }
  tft.drawRect(64, 280, 64, 50, WHITE);
  tft.setCursor(86, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("L");
  if (M_Guessed == true) {
    tft.fillRect(128, 280, 64, 50, LIGHTGREY);
  }
  tft.drawRect(128, 280, 64, 50, WHITE);
  tft.setCursor(150, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("M");
  if (N_Guessed == true) {
    tft.fillRect(192, 280, 64, 50, LIGHTGREY);
  }
  tft.drawRect(192, 280, 64, 50, WHITE);
  tft.setCursor(214, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("N");
  if (O_Guessed == true) {
    tft.fillRect(256, 280, 64, 50, LIGHTGREY);
  }
  tft.drawRect(256, 280, 64, 50, WHITE);
  tft.setCursor(278, 290);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("O");
  if (P_Guessed == true) {
    tft.fillRect(0, 330, 64, 50, LIGHTGREY);
  }
  tft.drawRect(0, 330, 64, 50, WHITE);
  tft.setCursor(22, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("P");
  if (Q_Guessed == true) {
    tft.fillRect(64, 330, 64, 50, LIGHTGREY);
  }
  tft.drawRect(64, 330, 64, 50, WHITE);
  tft.setCursor(86, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Q");
  if (R_Guessed == true) {
    tft.fillRect(128, 330, 64, 50, LIGHTGREY);
  }
  tft.drawRect(128, 330, 64, 50, WHITE);
  tft.setCursor(150, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("R");
  if (S_Guessed == true) {
    tft.fillRect(192, 330, 64, 50, LIGHTGREY);
  }
  tft.drawRect(192, 330, 64, 50, WHITE);
  tft.setCursor(214, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("S");
  if (T_Guessed == true) {
    tft.fillRect(256, 330, 64, 50, LIGHTGREY);
  }
  tft.drawRect(256, 330, 64, 50, WHITE);
  tft.setCursor(278, 340);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("T");
  if (U_Guessed == true) {
    tft.fillRect(0, 380, 64, 50, LIGHTGREY);
  }
  tft.drawRect(0, 380, 64, 50, WHITE);
  tft.setCursor(22, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("U");
  if (V_Guessed == true) {
    tft.fillRect(64, 380, 64, 50, LIGHTGREY);
  }
  tft.drawRect(64, 380, 64, 50, WHITE);
  tft.setCursor(86, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("V");
  if (W_Guessed == true) {
    tft.fillRect(128, 280, 64, 50, LIGHTGREY);
  }
  tft.drawRect(128, 380, 64, 50, WHITE);
  tft.setCursor(150, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("W");
  if (X_Guessed == true) {
    tft.fillRect(192, 380, 64, 50, LIGHTGREY);
  }
  tft.drawRect(192, 380, 64, 50, WHITE);
  tft.setCursor(214, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("X");
  if (Y_Guessed == true) {
    tft.fillRect(256, 380, 64, 50, LIGHTGREY);
  }
  tft.drawRect(256, 380, 64, 50, WHITE);
  tft.setCursor(278, 390);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Y");
  if (Z_Guessed == true) {
    tft.fillRect(0, 430, 64, 50, LIGHTGREY);
  }
  tft.drawRect(0, 430, 64, 50, WHITE);
  tft.setCursor(22, 440);
  tft.setTextColor(WHITE);
  tft.setTextSize(4);
  tft.println("Z");
  tft.drawRect(64, 430, 128, 50, WHITE);
  tft.setCursor(75, 445);
  tft.setTextColor(WHITE);
  tft.setTextSize(3);
  tft.println("DELETE");
  tft.drawRect(192, 430, 128, 50, WHITE);
  tft.setCursor(213, 445);
  tft.setTextColor(WHITE);
  tft.setTextSize(3);
  tft.println("ENTER");
  Last_Guessed_Word = Guessed_Word;
}

void Final_Guess_Page_Run() {
  TSPoint p = ts.getPoint();

  if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 480, 0);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);

    if (p.x > 180 && p.x < 230 && p.y > 0 && p.y < 64 && A_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "A" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 64 && p.y < 128 && B_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "B" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 128 && p.y < 192 && C_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "C" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 192 && p.y < 256 && D_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "D" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 180 && p.x < 230 && p.y > 256 && p.y < 320 && E_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "E" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 0 && p.y < 64 && F_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "F" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 64 && p.y < 128 && G_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "G" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 128 && p.y < 192 && H_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "H" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 192 && p.y < 256 && I_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "I" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 230 && p.x < 280 && p.y > 256 && p.y < 320 && J_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "J" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 0 && p.y < 64 && K_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "K" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 64 && p.y < 128 && L_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "L" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 128 && p.y < 192 && M_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "M" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 192 && p.y < 256 && N_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "N" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 280 && p.x < 330 && p.y > 256 && p.y < 320 && O_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "O" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 0 && p.y < 64 && P_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "P" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 64 && p.y < 128 && Q_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "Q" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 128 && p.y < 192 && R_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "R" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 192 && p.y < 256 && S_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "S" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 330 && p.x < 380 && p.y > 256 && p.y < 320 && T_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "T" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 0 && p.y < 64 && U_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "U" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 64 && p.y < 128 && V_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "V" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 128 && p.y < 192 && W_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "W" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 192 && p.y < 256 && X_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "X" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 380 && p.x < 430 && p.y > 256 && p.y < 320 && Y_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "Y" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 430 && p.x < 480 && p.y > 0 && p.y < 64 && Z_Guessed == false && Guessed_Word.indexOf("_") != -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Last_Guessed_Word = Guessed_Word;

      Guessed_Word = Guessed_Word.substring(0, Guessed_Word.indexOf("_")) + "Z" + Guessed_Word.substring(Guessed_Word.indexOf("_") + 1);

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 430 && p.x < 480 && p.y > 64 && p.y < 192)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      Guessed_Word = Last_Guessed_Word;

      tft.fillRect(0, 0, 320, 180, BLACK);
      tft.setCursor(0, 10);
      tft.setTextColor(WHITE);
      tft.setTextSize(4);
      tft.println(Guessed_Word);

      delay(300);
    }
    if (p.x > 430 && p.x < 480 && p.y > 192 && p.y < 320 && Guessed_Word.indexOf("_") == -1)
    {
      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      if (Real_Word == Guessed_Word) {
        Page_Number = 4;
        Word_Display_Page_Setup();
      }
      else {
        Limb_Number = 6;
        Page_Number = 3;
        Hangman_Display_Setup();
      }

      delay(300);
    }
  }
}

Comments

Similar projects you might like

Arduino Pocket Game Console + A-Maze - Maze Game

Project tutorial by Alojz Jakob

  • 14,388 views
  • 9 comments
  • 41 respects

LCD Hill Run v2 Runner Game

Project tutorial by PunkyMunky64

  • 9,874 views
  • 48 comments
  • 61 respects

Smartphone Controlled PC Game Using Dabble App

Project tutorial by STEMpedia

  • 1,100 views
  • 0 comments
  • 6 respects

Arduino Game By LCD

Project tutorial by Mohammed Magdy

  • 77,199 views
  • 86 comments
  • 242 respects

Snake LED Matrix Game

Project tutorial by Arduino bro

  • 20,368 views
  • 10 comments
  • 22 respects

The Chrome Dino Game on an LCD Shield

Project tutorial by Unsigned_Arduino

  • 10,881 views
  • 2 comments
  • 23 respects
Add projectSign up / Login