   colDisplay.setNum(bg->getColumn(val));
   numberDisplay.setNum(val);
 
-  //bg->configure(gridSize,gridSize,bg->font_size);
-
-}
+  boolean won = false;
+  signed char v = checkHorizontal(val);
+  if(v >= 0){
+    Serial.println("=============");
+    Serial.print("WON: Horizontal Made on Row ");
+    Serial.println(v);
+    won = true;
+  }  
+  v = checkVertical(val);
+  if(v >= 0){
+    Serial.println("=============");
+    Serial.print("WON: Vertical Made on Row ");
+    Serial.println(v);
+    won=true;
+  }    
+  if(checkDownDiagonal(val)){
+    Serial.println("=============");
+    Serial.println("WON: Down Diagonal Made!!!");
+    won=true;
+  }
+  if(checkUpDiagonal(val)){
+    Serial.println("=============");
+    Serial.println("WON: Up Diagonal Made!!!");
+    won=true;
+  }
+  showResult();
+
+  if(won){ 
+    displayWon();
+  }
+}
+
 
 void buttonEventHandler(Button* btn){
   Serial.println("Clear pressed");
-  //setBingoLabels();
-
+  setBingoLabels();
   buttonGrid.clear();
   rowDisplay.clear();
   colDisplay.clear();
-  
   numberDisplay.clear();
-}
+  clearResult();
+  showResult();
+}
+
+
+void displayWon(){
+    //canvas.pop();
+    btnWon.visible = true;
+    buttonGrid.visible = false;
+    clearResult();
+    canvas.redraw();
+}
+
+
+void wonEventHandler(Button* btn){
+  setBingoLabels();
+  btn->visible = false;
+  buttonGrid.visible = true;
+  canvas.redraw();
+}
+
 
 // Generates elements amount of unique random numbers
 // in the range from-to and store them in array

  // (Use layout template for coordinates)
  //=========================================

  //setBingoLabels();
  canvas.add(&rowDisplay,5,0);
  canvas.add(&colDisplay,5,50);  
  canvas.add(&numberDisplay,5,100);  
  canvas.add(&btnClear,5,150);
  canvas.add(&buttonGrid,100,0);
  
  delay(1000);
}


  Serial.println();
}


// Generates bingo labels and store then in 
// displayGrid array
void setBingoLabels(){
