title: Python memory matching game loop/logic issue
body: <p>I am making a basic game of memory matching. The idea is that by user input a board can be created with cards. Those cards all have a match somewhere on the board. Basically the input is the dimensions of the board and then coordinates to identify possible matches. However everytime I enter input even if valid the code seems to defer to invalid input. However when I enter two identical coordinates the part of my code will execute for that case. I am not sure what is going on here. </p>
  
  <pre><code>import random
  class Card():
      """Card object """
      def __init__(self, val):
          self.val = val 
          self.face = False
  
      def isFaceUp(self):
          """check to see if the cards face up"""
          return self.face
  
      def getVal(self):
          return self.val
  
      def makeFaceUp(self):
          self.face = True
  
      def __str__(self):
          return ", ".join(("Value: ", str(self.val), "Face: ", str(self.face)))
  
  class Deck():
      def __init__(self, pairs):
          self._pairs = pairs
          self._cards = []
          for cards in range(self._pairs):
              card1 = Card(cards + 1)
              self._cards.append(card1)
              card2 = Card(cards+1)
              self._cards.append(card2)
  
      def deal(self):
          if len(self) ==0:
              return None
          else:
              return self._cards.pop(0)
  
      def shuffle(self):
          random.shuffle(self._cards)
  
      def __len__(self):
          return len(self._cards)
  
  class Game():
      def __init__(self, rows, columns):
          self._deck = Deck((rows*columns)//2)
          self._rows = rows 
          self._columns = columns
          self._board = []
          for row in range(self._rows):
              self._board.append([0] * self._columns)
          self.populateBoard()
  
      def populateBoard(self):
          """Puts all cards in the board random"""
          self._deck.shuffle()
  
          for columns in range(self._columns):
              for rows in range(self._rows):
                  self._board[rows][columns] = self._deck.deal()
  
      def revealBoard(self):
          """checks the values on the board making sure theres pairs"""
          for rows in range(self._rows):
              for columns in range(self._columns):
                  print(str(self._board[rows][columns].getVal()) + \
                        " ", end="")
                  print("")
  
      def displayGame(self):
          """Displays the game in a 2d list"""
          for rows in range(self._rows):
              for columns in range(self._columns):
                  if self._board[rows][columns].isFaceUp() == False:
                      print("*", end = "")
                  else:
                      print(str(self._board[rows][columns].getVal() + \
                                " ", end = ""))
                      print("")
  
      def play(self):
          """Allows the game to play setting the cards into a double list """
          while not self.isGameOver():
              self.displayGame()
              c1 = input("Enter coordinates, (row, column) of card: ")
              c2 = input("Enter the coordinates of match: ")
              newC1 = list(map(int, c1.split()))
              newCard1 = self._board[(newC1[0])-1][(newC1[1])-1] #Get value here??? 
              newC2 = list(map(int, c2.split()))
              newCard2 = self._board[(newC2[0])-1][(newC2[1])-1]
  
              try:
                  if newCard1 != newCard2:
                      print("Not a pair", "Found: ",newCard1, "at", "(" + newC1, ", ", newC2, ")")
                  elif newC1 == newC2:
                      print("Identical Coordinate Entery")
                  elif newCard1.getVal() == newCard2.getVal():
                      self._board[newC1[0]-1][newC1[1]-1].makeFaceUp()
                      self._board[newC2[0]-1][newC2[1]-1].makeFaceUp()
                      print("pair found")
              except:
                  print("invalid input")
  
          print("Game Over")
          self.displayGame
  
      def isGameOver(self):
          """Test to determine if all the cards are facing up and revelied the game will be over"""
          for rows in range(self._rows):
              if not all(card.isFaceUp() for card in self._board[rows]):
                  return False
          return True
  
  def main():
      while True:
          # Force user to enter valid value for number of rows
          while True:
              rows = input("Enter number of rows ")
              if rows.isdigit() and ( 1 &lt;= int(rows) &lt;= 9):
                  rows = int(rows)
                  break
              else:
                  print ("    ***Number of rows must be between 1 and 9! Try again.***")
                  # Adding *** and indenting error message makes it easier for the user to see
  
          # Force user to enter valid value for number of columns
          while True:
              columns = input("Enter number of columns ")
              if columns.isdigit() and ( 1 &lt;= int(columns) &lt;= 9):
                  columns = int(columns)
                  break
              else:
                  print ("    ***Number of columns must be between 1 and 9! Try again.***")
  
          if rows * columns % 2 == 0:
              break
          else:
              print ("    ***The value of rows X columns must be even. Try again.***")
  
      game = Game(rows, columns)
      game.play()
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>Any help is appreciated and if anyone would need to see other parts of my code simply ask I'd be happy to put them in there if it will help finding this error.  </p>
  
  <p>Edit: Went ahead and added the whole code for testing. </p>