<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/25
 * Time: 14:10
 */

namespace Biz\Settlement\Adapter\Settlement;


class ZqRule

{

    ////////////////////////根据规则判断输赢
    //让球大小
     public  function    concede_size($model,$resultModel,$resultRecords){


     }

     //全场|主队|让球
    public  function   concede_home($model,$resultModel,$resultRecords){
            $zhiball = intval($resultModel->home_score) ;
            $keballs = intval($resultModel->guest_score) ;
            $cond = intval($model->condition) ;
            $cha = $zhiball - $keballs - $cond ;

            if ($cha  >0 ){ return 1; }
            if($cha ==0 ) { return 2 ;}
            return -1 ;
     }

     //主队全场让球条件
    public  function  concede_home_rule($model,$resultModel,$resultRecords){

    }

}