コード例 #1
0
 //========================================================
 //Methods
 void PaintThePath(List <Coord> path, Color color)
 {
     foreach (Coord step in path)
     {
         Command_MarkInterfaceCell?.Invoke(step.X, step.Y, color);
     }
 }
コード例 #2
0
        //=============================
        //Game setup part
        void DoSetupAt(byte X, byte Y)
        {
            byte currentCellValue = gameTableHolder.GetValue(X, Y);

            if (currentCellValue == blockValue)
            {
                gameTableHolder.SetValue(X, Y, unblockValue);
                Command_MarkInterfaceCell?.Invoke(X, Y, defaultColor);
            }
            else if (currentCellValue == unblockValue)
            {
                gameTableHolder.SetValue(X, Y, blockValue);
                Command_MarkInterfaceCell?.Invoke(X, Y, blockColor);
            }
            else
            {
                throw new Exception("GameManager.DoSetupAt: Cell value was invalid (not 0 and not 255), was table at tableholder itself changed somwhere else?");
            }
        }