Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""LICENSE
2Copyright 2020 Hermann Krumrey <hermann@krumreyh.com>
4This file is part of betbot.
6betbot is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
11betbot is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
16You should have received a copy of the GNU General Public License
17along with betbot. If not, see <http://www.gnu.org/licenses/>.
18LICENSE"""
20from typing import List
21from betbot.api.Bet import Bet
22from betbot.api.Match import Match
23from betbot.prediction.Predictor import Predictor
26class HomeTeamPredictor(Predictor):
27 """
28 Class that always predicts 2:1 for the home team
29 """
31 @classmethod
32 def name(cls) -> str:
33 """
34 :return: The name of the predictor
35 """
36 return "home-team"
38 def predict(self, matches: List[Match]) -> List[Bet]:
39 """
40 Performs the prediction
41 :param matches: The matches to predict
42 :return: The predictions as Bet objects
43 """
44 bets = []
45 for match in matches:
46 bets.append(Bet(match, 2, 1))
47 return bets