示例#1
0
        public frm_Map()
        {
            this.DoubleBuffered = true;
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            UpdateStyles();
            InitializeComponent();

            gamePlay = new GamePlayControll(this);
            Execute(gamePlay, new Modify(), new GamePlayCommand(gamePlay, Enum.GamePlayAction.SetListPiece));
            Execute(gamePlay, new Modify(), new GamePlayCommand(gamePlay, Enum.GamePlayAction.SetListPlayer));

            AllPlayerGraphicSet();
        }
示例#2
0
 public GamePlayCommand(GamePlayControll gamePlay, PlayerAction playerAction, int position)
 {
     _gamePlay     = gamePlay;
     _playerAction = playerAction;
     _position     = position;
 }
示例#3
0
 public GamePlayCommand(GamePlayControll gamePlay, GamePlayAction playerAction)
 {
     _gamePlay     = gamePlay;
     _playerAction = playerAction;
 }
示例#4
0
 private void Execute(GamePlayControll gamePlayControll, Modify modifyGamePlay, ICommand GamePlayCommand)
 {
     modifyGamePlay.SetCommand(GamePlayCommand);
     modifyGamePlay.Invoke();
 }