using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; using Random = System.Random; /// /// gameplay behaviour class /// public class Gameplay { /// /// countdown text label for showing the countdown /// private readonly Label _countdownText; /// /// list of played rounds /// private readonly List _playedRounds = new(5); /// /// response colour for the player to match /// private readonly VisualElement _responseColour; /// /// round text label for showing the current round /// private readonly Label _roundText; /// /// template colour for the player to match /// private readonly VisualElement _templateColour; /// /// game countdown timer /// private DateTime _countdownDatetime; /// /// game round counter /// private int _round = -1; public int RoundsPerGame = 5; public double SecondsPerRound = 15d; /// /// constructor for the gameplay class /// /// the visual element object for the ui document with the GameView private Gameplay(VisualElement ui) { _roundText = ui.Q