Exemplo n.º 1
0
        void DrawScore(ITurtleDrawing drawing)
        {
            double scoreOneX = drawing.ScreenWidth * .25;
            double scoreTwoX = drawing.ScreenWidth * .75;

            drawing.DrawText(Colors.Blue, new Point((int)scoreOneX, 20), PlayerOneScore.ToString());
            drawing.DrawText(Colors.Red, new Point((int)scoreTwoX, 20), PlayerTwoScore.ToString());
        }
Exemplo n.º 2
0
        public void OnDraw(long frame, ITurtleDrawing drawing)
        {
            // when that happens, generate new location for square
            // Bonus: Add counter number times caught
            Color color = Colors.Red;             //new Color ((byte)(random.Next () % 256), (byte)(random.Next () % 256), (byte)(random.Next () % 256));

            drawing.Fill(color);

            drawing.DrawSquare(Colors.Green, SquarePosition, SquareSize);
            drawing.DrawText(Colors.White, new Point(16, 16), CaughtCount.ToString());
            drawing.DrawTurtle(TurtlePosition);
        }