Advertisement
Guest User

B

a guest
Nov 23rd, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.17 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace ZMEYKA
  11. {
  12.     class CONTROLLER
  13.     {
  14.     }
  15.  
  16.     abstract class BLOCK
  17.     {
  18.         public int XLoc;
  19.         public int YLoc;
  20.        
  21.     }
  22.  
  23.     class SnakeBlock : BLOCK
  24.     {
  25.         bool head;
  26.         static Color color = Color.Green;
  27.         Byte direction;
  28.         SnakeBlock next;
  29.         SnakeBlock previous;
  30.         public SnakeBlock( bool head, Byte direction, SnakeBlock next, SnakeBlock previous, int XLoc, int YLoc)
  31.         {
  32.             this.direction = direction;
  33.             this.head = head;
  34.             this.next = next;
  35.             this.previous = previous;
  36.             this.XLoc = XLoc;
  37.             this.YLoc = YLoc;
  38.  
  39.         }
  40.         public void draw(Graphics g)
  41.         {
  42.             g.DrawRectangle(new Pen(Color.Green), XLoc, YLoc, 50, 50);
  43.             g.FillRectangle(new SolidBrush(Color.Green), XLoc, YLoc, 50, 50);
  44.         }
  45.  
  46.     }
  47.  
  48.     class WallBlock : BLOCK
  49.     {
  50.  
  51.     }
  52.  
  53.     class FoodBlock : BLOCK
  54.     {
  55.  
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement