Exemplo n.º 1
0
        public static void DrawPlayer(MPoint where, Player who, int Width)
        {
            int maxWidth = Width / 2;
            int ostWidth = Width - maxWidth;

            MDrawHandler.DrawStringInPoint(where, MDrawHandlerMTG.DefaultColor, who.PlayerName, maxWidth);
            int offset = 1;

            who.hand.RedrawFull(where.AddY(offset), maxWidth); offset      += who.hand.Count + 1;
            who.deck.RedrawFull(where.AddY(offset), maxWidth); offset      += who.deck.Count + 1;
            who.graveyard.RedrawFull(where.AddY(offset), maxWidth); offset += who.graveyard.Count + 1;
            who.exile.RedrawFull(where.AddY(offset), maxWidth); offset     += who.exile.Count + 1;
            who.field.RedrawFull(where.Add(maxWidth, 1), ostWidth);
        }
Exemplo n.º 2
0
 public override void Redraw(MPoint leftUpCorner)
 {
     base.Redraw(leftUpCorner);
     for (int i = 0; i < Text.Count; ++i)
     {
         MDrawHandler.DrawStringInPoint(leftUpCorner.AddY(i), Color, Text[i], Width);
     }
 }
Exemplo n.º 3
0
 public static MPoint Trace(String S)
 {
     if (!Write)
     {
         return(new MPoint(-1, -1));
     }
     logs.Add(S);
     // clear all
     if (logs.Count % height == 0)
     {
         MDrawHandler.DrawRectangle(new MRectangle(leftTopCorner, width, height), new CColor(ConsoleColor.Black));
     }
     MPoint where = leftTopCorner.AddY(logs.Count % height);
     MDrawHandler.DrawStringInPoint(where, logColor, S, width);
     return(where);
 }