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.Threading.Tasks;
- using System.Drawing;
- using System.IO;
- namespace Песочница_курсовая_ООП
- {
- class CShape
- {
- private Vector COORDINATES;
- private Color COLOR;
- private bool SELECTED;
- public bool Selected { get { return this.SELECTED; } }
- public Vector Coordinates
- {
- get { return COORDINATES; }
- set
- {
- COORDINATES = value;
- }
- }
- public Color color
- {
- get { return COLOR; }
- set
- {
- COLOR = value;
- }
- }
- public bool selected
- {
- get { return SELECTED; }
- set
- {
- SELECTED = value;
- }
- }
- public virtual void Select()
- {
- selected=!selected;
- }
- public virtual void ColorChange(Color color)
- {
- this.color = color;
- }
- public virtual bool Shot(int x, int y)
- {
- return false;
- }
- public virtual void Draw(Graphics e)
- {
- ;
- }
- public virtual bool Check(int Height, int Width)
- {
- return false;
- }
- public virtual bool FullCheck(int Height, int Width, STORAGE a1, int numb)
- {
- return false;
- }
- public virtual void StableMove (Vector delta)
- {
- this.Coordinates += delta;
- /* this.Coordinates.x+=delta.x;
- this.Coordinates.y+=delta.y;*/
- }
- public virtual void ControlledMove(Vector delta, int Height, int Width, STORAGE a1, int numb)
- {
- this.StableMove(delta);
- if (!this.FullCheck(Height, Width,a1, numb))
- {
- delta *= (-1);
- this.StableMove(delta);
- }
- }
- public virtual void Resize(double delta)
- {
- ;
- }
- public virtual void ControlledResize(double delta, int Height, int Width)
- {
- this.Resize(delta);
- if(!this.Check(Height, Width))
- {
- this.Resize(-delta);
- }
- }
- public virtual void Save(ref StreamWriter MyWriter)
- {
- ;
- }
- public virtual void Load(ref StreamReader MyReader)
- {
- ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment