足球战术->横传转移之chain of resposibility篇

新闻 » 健身 » 体育运动

足球战术->横传转移之chain of resposibility篇
2015-10-01 04:00:49

<p style=line-height: 150%>接上回: <p style=line-height: 150%><a href="http://www.csdn.net/develop/read_article.asp?id=11180">http://www.csdn.net/develop/read_article.asp?id=11180</a> <p style=line-height: 150%>横传捣脚转移是找出进攻突破口的最好的方法,中国队
这次十强赛最大的进步就是这方面。这比较符合
chain of resposibility模式。整个前锋,前卫,和
后卫线形成一条链,对每个队员解耦,把进攻请求
按一个一个队员(对象)传过去,直到机会出现,
合适的队员完成进攻。好处是队员不用知道机会
什么时候出现,只要从对方队员密集处(无法完成
进攻)向对方队员稀疏处(易于完成进攻)转移。
可随机改变打发,利于灵活处理进攻任务。缺点是
可能捣了半天也没得到进攻机会,反被对方断球,
被打反击。代码如下:
class 队员{
public:
   队员(队员* s):_后继(s){}
   virtual void 处理球();
private:
   队员* _后继;
}; <p style=line-height: 150%>void 队员::处理球(){
  if(_后继){
    _后继->处理球();
  }
} <p style=line-height: 150%>void 队员::处理进攻请求(请求* the请求){
   switch(the请求->得到类型()){
   case 射门:
       处理射门((射门请求*)the请求);
       break;
   case 突破:
       处理突破((突破请求*)the请求);
       break;
   default:
       break;
    }
} <p style=line-height: 150%>class 具体队员:public 队员{
public:
    virtual void 处理请求(请求* the请求);
}; <p style=line-height: 150%>void 具体队员::处理请求(请求* the请求){
  switch(the请求->得到类型()){
 case 突破分球:
      <a href="file://处">file://处</a>理突破分球
      break;
     default:
     <a href="file://处">file://处</a>理其它请求
    队员::处理请求(the请求);
    }
}


首页

医生

咨询

商城

我的