mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* adding option to enable chess ai * removing debug line * improved /debugchess output * more ai fixes * preventing ai from putting itself in check, adding ai stalemate support * neverending chess fixes
30 lines
638 B
C#
30 lines
638 B
C#
using ACE.Entity;
|
|
using ACE.Entity.Enum;
|
|
using ACE.Server.Managers;
|
|
using ACE.Server.WorldObjects;
|
|
|
|
namespace ACE.Server.Entity.Chess
|
|
{
|
|
public class ChessSide
|
|
{
|
|
public ObjectGuid PlayerGuid;
|
|
public ChessColor Color;
|
|
public bool Stalemate;
|
|
|
|
public ChessSide(ObjectGuid playerGuid, ChessColor color)
|
|
{
|
|
PlayerGuid = playerGuid;
|
|
Color = color;
|
|
}
|
|
|
|
public bool IsAi()
|
|
{
|
|
return !PlayerGuid.IsPlayer();
|
|
}
|
|
|
|
public Player GetPlayer()
|
|
{
|
|
return PlayerManager.GetOnlinePlayer(PlayerGuid);
|
|
}
|
|
}
|
|
}
|