-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b550342
commit ea80880
Showing
8 changed files
with
113 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Discord.Commands; | ||
using ClassLibrary; | ||
|
||
namespace Library.Commands; | ||
|
||
/// <summary> | ||
/// Esta clase implementa el comando 'join' del bot. Este comando une al jugador | ||
/// que envía el mensaje a la lista de jugadores esperando para jugar. | ||
/// </summary> | ||
// ReSharper disable once UnusedType.Global | ||
public class AttackCommand : ModuleBase<SocketCommandContext> | ||
{ | ||
/// <summary> | ||
/// Implementa el comando 'join'. Este comando une al jugador que envía el | ||
/// mensaje a la lista de jugadores esperando para jugar. | ||
/// </summary> | ||
[Command("attack")] | ||
[Summary("Ejecuta el ataque")] | ||
// ReSharper disable once UnusedMember.Global | ||
public async Task ExecuteAsync([Remainder]string moveName) | ||
{ | ||
//validar movename | ||
|
||
string displayName = CommandHelper.GetDisplayName(Context); | ||
string result = Facade.Instance.PlayerAttack(displayName, moveName); | ||
|
||
|
||
await ReplyAsync(result); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Discord.Commands; | ||
using ClassLibrary; | ||
|
||
namespace Library.Commands; | ||
|
||
/// <summary> | ||
/// Esta clase implementa el comando 'join' del bot. Este comando une al jugador | ||
/// que envía el mensaje a la lista de jugadores esperando para jugar. | ||
/// </summary> | ||
// ReSharper disable once UnusedType.Global | ||
public class InitCommand : ModuleBase<SocketCommandContext> | ||
{ | ||
/// <summary> | ||
/// Implementa el comando 'join'. Este comando une al jugador que envía el | ||
/// mensaje a la lista de jugadores esperando para jugar. | ||
/// </summary> | ||
[Command("init")] | ||
[Summary("")] | ||
// ReSharper disable once UnusedMember.Global | ||
public async Task ExecuteAsync() | ||
{ | ||
string[] attackerPokemons = new string[] { "Blaziken", "Tinkaton", "Salamence", }; | ||
string[] defenderPokemons = new string[] { "Tinkaton", "Zangoose", "Rayquaza", }; | ||
string move = "Patada Ígnea"; | ||
string move2 = "Carantoña"; | ||
|
||
string displayName = CommandHelper.GetDisplayName(Context); | ||
string result = Facade.Instance.AddPlayerToWaitingList(displayName); | ||
result = result + Facade.Instance.AddPlayerToWaitingList("player1"); | ||
result = result + Facade.Instance.StartBattle(displayName, "player1"); | ||
result = result + Facade.Instance.ChoosePokemons(displayName, attackerPokemons); | ||
result = result + Facade.Instance.ChoosePokemons("player1", defenderPokemons); | ||
Facade.Instance.ChoosePokemonAndMoveToAttack( displayName, move, attackerPokemons[0]); | ||
Facade.Instance.ChoosePokemonAndMoveToAttack( "player1", move2, defenderPokemons[0]); | ||
|
||
await ReplyAsync(result); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace ClassLibrary; | ||
|
||
public class PokemonException: ApplicationException | ||
|
||
{ | ||
public PokemonException(string message) : base(message) | ||
{ | ||
//está intencionalmente en blanco | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters