Added logic to check for win, loss or draw