iOS - passing data between View Controllers

Hello, I’m experimenting with iOS dev and tried this tutorial: Part 1, part 2.
It works almost entirely with storyboards.
The first scene is a list of players, they have a name, a game associated to them, and a 1-to5-star rating:

struct Player {
  var name: String?
  var game: String?
  var rating: Int
}

This tutorial covers adding more players to the list. I want to extend the functionality with the ability to edit existing players. So by tapping one of the players , you get to a scene identical to the “Add Player” one, except the existing player’s name is shown in the text field, their game selected (instead of the default game) .
That last part is what I’m having trouble with: How do I get the “Edit Player” view controller to take the tapped player’s name and game from the previous one?
This is the Players’ list view controller:

/// Copyright (c) 2020 Razeware LLC

import UIKit

class PlayersViewController: UITableViewController {
  var playersDataSource = PlayersDataSource()
  
  override func prepare(for segue: UIStoryboardSegue, sender: Any?)  {
    if segue.identifier == "EditPlayer",
       let playerName = nameTextField.text,
       let gameName = detailLabel.text {
      player = Player(name: playerName, game: gameName, rating: 1)
    }
  }
}
extension PlayersViewController {
  override func tableView(
    _ tableView: UITableView,
    numberOfRowsInSection section: Int
  ) -> Int {
  playersDataSource.numberOfPlayers()
  }
  
  override func tableView(
    _ tableView: UITableView,
    cellForRowAt indexPath: IndexPath
  ) -> UITableViewCell {
  let cell = tableView.dequeueReusableCell(
  withIdentifier: "PlayerCell",
  for: indexPath) as! PlayerCell
    cell.player = playersDataSource.player(at: indexPath)
  return cell
  }
}
extension PlayersViewController {
  @IBAction func cancelToPlayersViewController(_ segue: UIStoryboardSegue) {
  }

  @IBAction func savePlayerDetail(_ segue: UIStoryboardSegue) {
    guard
      let playerDetailsViewController = segue.source as? PlayerDetailsViewController,
      let player = playerDetailsViewController.player
      else {
        return
    }
    
    playersDataSource.append(player: player, to: tableView)
  }
}

This is the part that’s wrong somehow (compiler errors)

override func prepare(for segue: UIStoryboardSegue, sender: Any?)  {
    if segue.identifier == "EditPlayer",
       let playerName = nameTextField.text, // this and next two lines should do what I want
       let gameName = detailLabel.text { // at least that's what I hoped
      player = Player(name: playerName, game: gameName, rating: 1)
    }

Tbh I’m still rather clueless about Swift, you probably guessed it.
Here’s the view controller that should receive player name and game: display the name in the text field and have the game selected:

import UIKit

class PlayerDetailsViewController: UITableViewController {
  
  var player: Player?
  
  var game = "" {
    didSet {
      detailLabel.text = game
    }
  }
  
  @IBOutlet weak var nameTextField: UITextField!
  @IBOutlet weak var detailLabel: UILabel!
  
  required init?(coder aDecoder: NSCoder) {
    print("init PlayerDetailsViewController")
    super.init(coder: aDecoder)
  }

  deinit {
    print("deinit PlayerDetailsViewController")
  }
  
  override func prepare(for segue: UIStoryboardSegue, sender: Any?)  {
    
    if segue.identifier == "SavePlayerDetail",
       let playerName = nameTextField.text,
       let gameName = detailLabel.text {
      player = Player(name: playerName, game: gameName, rating: 1)
    }

    if segue.identifier == "PickGame",
       let gamePickerViewController = segue.destination as? GamePickerViewController {
      gamePickerViewController.gamesDataSource.selectedGame = game
    }
  }
  
  override func viewDidLoad() {
    game = "Schach"
    nameTextField.becomeFirstResponder()
  }
}
extension PlayerDetailsViewController {
  @IBAction func unwindWithSelectedGame(segue: UIStoryboardSegue) {
    if let gamePickerViewController = segue.source as? GamePickerViewController,
       let selectedGame = gamePickerViewController.gamesDataSource.selectedGame {
      game = selectedGame
    }
  }
}

Any and all pointers are greatly appreciated!

Here’s the entire project in case you’d like to run it.

Btw I found this summary for passing data:

which gave me the idea that the prepare(for:sender:) function should handle this task, but apparently I’m not giving it the right stuff to work with:

 if segue.identifier == "EditPlayer",
       let playerName = nameTextField.text,
       let gameName = detailLabel.text {
      player = Player(name: playerName, game: gameName, rating: 1)
    }

So is the content of this function what I need to look at, or am I completely on the wrong path?