java.lang.Object
edu.ntnu.idatt1002.k2g05.controllers.opentournament.utils.MatchColumn

public class MatchColumn extends Object
A Match Column is related to matches between to Players. The reason for this i because of duplicates and handling them accordingly
  • Constructor Details

    • MatchColumn

      public MatchColumn(int col)
      Constructor for making an instance of the MatchColumn.
      Parameters:
      col - index of the column
  • Method Details

    • containsPlayer

      public boolean containsPlayer(Player player)
      Check if a player is in a Match Column
      Parameters:
      player - to check for
      Returns:
    • addPlayerPairAndMatch

      public void addPlayerPairAndMatch(PlayerPair playerPair, Match match)
      Method for adding a Player Pair and a correlated match.
      Parameters:
      playerPair - pair to add.
      match - to add.
    • addPlayerPairAndNode

      public void addPlayerPairAndNode(PlayerPair playerPair, javafx.scene.Node node)
      Method for adding a Player and a correlated node.
      Parameters:
      playerPair - pair to add
      node - node to add
    • createMatchPair

      public void createMatchPair(PlayerPair playerPair, Match match)
      Method for creating a match pair given a player pair and a match. The match will be combined with the previous added match One should check if the player pair is already in the match column
      Parameters:
      playerPair - to add
      match - to pair with other
    • getAllNodes

      public Collection<javafx.scene.Node> getAllNodes()
      Method for getting all the nodes in the match colum
      Returns:
      the nodes
    • getIndex

      public int getIndex()
      Method for getting the column index
      Returns:
      the index
    • containsPlayerPair

      public boolean containsPlayerPair(PlayerPair pair)
      Checks if the Match Column contains a given player pair
      Parameters:
      pair - to check for
      Returns:
      true if yes
    • getMatchPairByPlayerPair

      public MatchPair getMatchPairByPlayerPair(PlayerPair pair)
      Method for getting the correlating MatchPair given the player pair
      Parameters:
      pair - to get the match form
      Returns:
      the MatchPair
      Throws:
      NoSuchElementException - if the PlayerPair is not in the MatchColumn
    • getAllPlayerPairs

      public Collection<PlayerPair> getAllPlayerPairs()
      Method for getting all the Player Pairs.
      Returns: