Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Drawing;
- namespace SnakeV2
- {
- class FoodObject
- {
- public Point Point;
- Random rnd = new Random();
- public FoodObject()
- {
- Point = new Point(rnd.Next(2, Console.WindowHeight - 2), rnd.Next(2, Console.WindowWidth - 2));
- }
- public void Draw()
- {
- Console.SetCursorPosition(Point.Y, Point.X);
- Console.Write('*');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement