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(); }
public GamePlayCommand(GamePlayControll gamePlay, PlayerAction playerAction, int position) { _gamePlay = gamePlay; _playerAction = playerAction; _position = position; }
public GamePlayCommand(GamePlayControll gamePlay, GamePlayAction playerAction) { _gamePlay = gamePlay; _playerAction = playerAction; }
private void Execute(GamePlayControll gamePlayControll, Modify modifyGamePlay, ICommand GamePlayCommand) { modifyGamePlay.SetCommand(GamePlayCommand); modifyGamePlay.Invoke(); }