Ejemplo n.º 1
0
        internal static string Move(this CGameResult move, string current, ModuleScript moduleScript = null)
        {
            var str = new StringBuilder(current);

            // If the destination is occupied, this implies a capture.
            if (str[move.Destination] != '_' && moduleScript != null)
            {
                moduleScript.PlaySound(Sounds._1dch.Capture);
            }

            // Moves origin to destination, leaving origin empty.
            str[move.Destination] = str[move.Origin];
            str[move.Origin]      = '_';

            return(str.ToString());
        }
Ejemplo n.º 2
0
 internal static bool IsEqual(this CGameResult move, CGameResult other)
 {
     return(move.Origin == other.Origin && move.Destination == other.Destination);
 }