Example #1
0
        public async Task <bool> SetPlayerChoice(User user, Player.Choice choice)
        {
            await user.PrivateChannel.SendMessage("Your choice is " + choice + GetChoiceEmote(choice));

            Players.Where(player => player.DiscordUser.Id.Equals(user.Id)).First().PlayerChoice = choice;
            return(CheckBattle(user).Result);
        }
Example #2
0
        public string GetChoiceEmote(Player.Choice choice)
        {
            switch (choice)
            {
            case Player.Choice.Unassigned:
                return(":x:");

            case Player.Choice.Paper:
                return(paperEmote);

            case Player.Choice.Rock:
                return(rockEmote);

            case Player.Choice.Scissors:
                return(scissorsEmote);

            default:
                return(":x:");
            }
        }
Example #3
0
 public void showCurrentPossibleMove(Board board)
 {
     Player.Choice tmpChoice = new Player.Choice();
     Console.Write("Possible Move are : ");
     for (int x = 2; x < 4; x++)
     {
         for (int y = 0; y < 8; y++)
         {
             tmpChoice.coord.X = x;
             tmpChoice.coord.Y = y;
             if (board.isPlayable(tmpChoice))
             {
                 if (!(tmpChoice.isPossibleToCaptureSomewhere(board) && !board.isCapturePossible(tmpChoice)))
                 {
                     Console.Write(" " + (char)(y + (int)'A') + (x + 1));
                 }
             }
         }
     }
 }
Example #4
0
 public bool SetBotChoice(ulong id, Player.Choice choice)
 {
     Players.Where(player => player.DiscordUser.Id.Equals(id)).First().PlayerChoice = choice;
     return(CheckBattle(Bot.Client.CurrentUser.Mention).Result);
 }