Skip to content
Snippets Groups Projects

add goToNextPlayer in Game + changed constructors and inheritance from LightGame

Merged Nina Forde requested to merge ninafrd/goToNextPlayer into data
3 unresolved threads

Merge request reports

Merged by Pierre RousselPierre Roussel 2 years ago (Nov 27, 2022 5:37pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
3 3 using System.Linq;
4 4 using System.Text;
5 5 using System.Threading.Tasks;
6 using Shared.data;
  • 19 21 public int nbNoRise { set; get; }
    20 22 public List<ChatMessage> chat { set; get; }
    21 23
    22 public Game(int smallBlind, int bingBLind)
    23 {
    24 this.rounds = new List<Round>();
    24 // Default constructor for the derived class.
    25
    26 public Game(int id):base(id)
    27 {
    28 }
    29
    30
    31 // public Game(int smallBlind, int bingBLind, int id)
    32 public Game(int id, string status, int indexRound, List<Player> players, List<User> spectators, List<User> lobby, int smallBlind,
    33 int bingBLind) : base(id)
  • 56 77 this.highestBet = highestBet;
    57 78 this.nbNoRise = nbNoRise;
    58 79 this.chat = chat;
    59 }
    80 }*/
    81
    82 public int GoToNextPlayer()
    83 {
    84
    85 int nbOfPlayers = this.players.Count;
    86 int tmp = this.currentPLayerIndex + 1;
    87 this.currentPLayerIndex = tmp < nbOfPlayers ? tmp : 0;
  • Pierre Roussel added 1 commit

    added 1 commit

    Compare with previous version

  • Pierre Roussel added 4 commits

    added 4 commits

    Compare with previous version

  • Pierre Roussel approved this merge request

    approved this merge request

  • Pierre Roussel mentioned in commit adf66f0c

    mentioned in commit adf66f0c

  • Please register or sign in to reply
    Loading