You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sae201_qwirkle/Qwirkle/QwirkleConsoleApp/NotificationClass.cs

51 lines
1.5 KiB

using QwirkleClassLibrary.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
namespace QwirkleConsoleApp
{
class NotificationClass
{
public void NotificationPlayerAdd(object? sender, AddPlayerNotifiedEventArgs args)
{
ForegroundColor = ConsoleColor.Yellow;
WriteLine();
WriteLine(args.ReturnedNotified);
WriteLine();
ResetColor();
}
public void NotificationNextPlayer(object? sender, NextPlayerNotifiedEventArgs args)
{
ForegroundColor = ConsoleColor.Yellow;
WriteLine();
WriteLine(args.Player.NameTag + "'s turn");
WriteLine();
ResetColor();
}
public void NotificationAddTile(object? sender, PlaceTileNotifiedEventArgs args)
{
ForegroundColor = ConsoleColor.Magenta;
WriteLine();
WriteLine("The tile [" + args.Tile.ToString() + "] " + args.Reason);
WriteLine();
ResetColor();
}
public void NotificationEndOfGame(object? sender, EndOfGameNotifiedEventArgs args)
{
ForegroundColor = ConsoleColor.Red;
WriteLine();
WriteLine("This end of game ! The last player is " + args.Player.NameTag + " !");
WriteLine();
ResetColor();
}
}
}