Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace ZMEYKA
- {
- class CONTROLLER
- {
- }
- abstract class BLOCK
- {
- public int XLoc;
- public int YLoc;
- }
- class SnakeBlock : BLOCK
- {
- bool head;
- static Color color = Color.Green;
- Byte direction;
- SnakeBlock next;
- SnakeBlock previous;
- public SnakeBlock( bool head, Byte direction, SnakeBlock next, SnakeBlock previous, int XLoc, int YLoc)
- {
- this.direction = direction;
- this.head = head;
- this.next = next;
- this.previous = previous;
- this.XLoc = XLoc;
- this.YLoc = YLoc;
- }
- public void draw(Graphics g)
- {
- g.DrawRectangle(new Pen(Color.Green), XLoc, YLoc, 50, 50);
- g.FillRectangle(new SolidBrush(Color.Green), XLoc, YLoc, 50, 50);
- }
- }
- class WallBlock : BLOCK
- {
- }
- class FoodBlock : BLOCK
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement