Example #1
0
File: About.cs Project: Vadya44/Sim
 public static void OnDraw(Canvas canvas)
 {
     canvas.DrawColor(Paints.resultLose.Color);
     Paints.DrawButton(canvas, 30, 50, 690, 900);
     Paints.DrawText(canvas, 40, 180, "Application's history:", 70, 50);
     Paints.DrawText(canvas, 37, 370, "Application is created as part", 50, 30);
     Paints.DrawText(canvas, 110, 520, "of 1st year project by", 50, 30);
     Paints.DrawText(canvas, 50, 670, "Gataullin Vadim, student of", 50, 30);
     Paints.DrawText(canvas, 110, 820, " SE CS HSE. May 2k17", 50, 30);
     Paints.DrawButton(canvas, 100, 1000, 620, 1150);
     Paints.DrawText(canvas, 112, 1100, "Main menu", 100, 75);
 }
Example #2
0
 // With clicks
 public static void OnDraw(Canvas canvas)
 {
     if (_isPlWin)
     {
         Paints.DrawRes(canvas, true);
     }
     else
     {
         Paints.DrawRes(canvas, false);
     }
     Paints.DrawButton(canvas, 135, 1000, 585, 1150);
     Paints.DrawText(canvas, 138, 1100, "Main menu", 90, 60);
     Paints.DrawButton(canvas, 135, 800, 585, 950);
     Paints.DrawText(canvas, 148, 900, "New game", 90, 60);
 }
Example #3
0
 // With clicks
 public static void OnDraw(Canvas canvas)
 {
     canvas.DrawColor(Paints.background.Color);
     GameView.Instance.Invalidate();
     Paints.DrawButton(canvas, 420, 60, 700, 200);    // Solo
     Paints.DrawText(canvas, 490, 155, "Solo", 70, 40);
     Paints.DrawButton(canvas, 20, 60, 300, 200);     // PvP
     Paints.DrawText(canvas, 105, 155, "PvP", 70, 40);
     Paints.DrawButton(canvas, 20, 1050, 275, 1150);  // About
     Paints.DrawText(canvas, 50, 1120, "About", 70, 40);
     Paints.DrawButton(canvas, 445, 1050, 700, 1150); // Rules
     Paints.DrawText(canvas, 490, 1120, "Rules", 70, 40);
     ring1.Draw(canvas, animTime, 300);
     ring2.Draw(canvas, animTime, 210);
     GameView.Instance.Invalidate();
 }
Example #4
0
File: Rules.cs Project: Vadya44/Sim
 public static void OnDraw(Canvas canvas)
 {
     canvas.DrawColor(Paints.resultLose.Color);
     Paints.DrawButton(canvas, 30, 50, 690, 900);
     Paints.DrawText(canvas, 50, 100, "Two players take turns coloring any", 40, 20);
     Paints.DrawText(canvas, 105, 170, "uncolored lines. One player", 40, 20);
     Paints.DrawText(canvas, 110, 240, "colors in one color, and the", 40, 20);
     Paints.DrawText(canvas, 100, 310, "other colors in another color,", 40, 20);
     Paints.DrawText(canvas, 140, 380, "with each player trying to", 40, 20);
     Paints.DrawText(canvas, 33, 450, "avoid the creation of a triangle made", 40, 20);
     Paints.DrawText(canvas, 50, 530, "solely of their color (only triangles", 40, 20);
     Paints.DrawText(canvas, 95, 600, "with the dots as corners count;", 40, 20);
     Paints.DrawText(canvas, 112, 670, "intersections of lines are not", 40, 20);
     Paints.DrawText(canvas, 140, 740, "relevant); the player who", 40, 20);
     Paints.DrawText(canvas, 140, 810, "completes such a triangle", 40, 20);
     Paints.DrawText(canvas, 190, 880, "loses immediately.", 40, 20);
     Paints.DrawButton(canvas, 100, 1000, 620, 1150);
     Paints.DrawText(canvas, 112, 1100, "Main menu", 100, 75);
 }
Example #5
0
        public static void OnDraw(Canvas canvas)
        {
            canvas.DrawColor(Paints.background.Color);
            Circle _circle = new Circle();

            _circle.Draw(canvas);
            Methods.DrawPoints(_points, canvas, _circle);
            Paints.DrawButton(canvas, 375, 1050, 690, 1150);
            Paints.DrawText(canvas, 385, 1120, "Concede", 75, 50);
            if (_plArr != null)
            {
                for (int i = 0; i < _plArr.Length; i++)
                {
                    canvas.DrawLine(_plArr[i].p1.X * GameView.Factor,
                                    _plArr[i].p1.Y * GameView.Factor,
                                    _plArr[i].p2.X * GameView.Factor,
                                    GameView.Factor * _plArr[i].p2.Y, Paints.plSoloLine);
                }
            }
            if (_botArr != null)
            {
                for (int j = 0; j < _botArr.Length; j++)
                {
                    canvas.DrawLine(_botArr[j].p1.X * GameView.Factor,
                                    _botArr[j].p1.Y * GameView.Factor,
                                    _botArr[j].p2.X * GameView.Factor,
                                    GameView.Factor * _botArr[j].p2.Y, Paints.botSoloLine);
                }
            }
            if (_endGameFlag)
            {
                Paints.DrawButtonM(canvas, 100, 40, 620, 200);
                Paints.DrawTextM(canvas, 140, 150, "Game over", 90, 70);
                if (_winner == "bot" && _plArr != null)
                {
                    for (int i = 0; i < _plArr.Length; i++)
                    {
                        if ((i == _ind1 || i == _ind2 || i == _ind3) && _plArr != null)
                        {
                            canvas.DrawLine(_plArr[i].p1.X * GameView.Factor,
                                            _plArr[i].p1.Y * GameView.Factor,
                                            _plArr[i].p2.X * GameView.Factor,
                                            GameView.Factor * _plArr[i].p2.Y, Paints.triangle);
                        }
                    }
                }
                if (_winner == "player" && _botArr != null)
                {
                    for (int j = 0; j < _botArr.Length; j++)
                    {
                        if ((j == _ind1 || j == _ind2 || j == _ind3) && _botArr != null)
                        {
                            canvas.DrawLine(_botArr[j].p1.X * GameView.Factor,
                                            _botArr[j].p1.Y * GameView.Factor,
                                            _botArr[j].p2.X * GameView.Factor,
                                            GameView.Factor * _botArr[j].p2.Y, Paints.triangle);
                        }
                    }
                }
            }
        }