import random

from source.constants import POINT, GAME_POINT


class Player:

    def __init__(self, username):
        self.username = username
        self.score = 0
        self.games_won = 0
        self.sets_won = 0

    def ball_is_hitted_back(self):
        return bool(random.getrandbits(1))

    def serve_ball(self):
        print(f'Player {self.username} served the ball')

        if self.ball_is_hitted_back():
            print(f'The ball was returned by the other player')
        else:
            if self.score >= 30:
                print(f'Player {self.username} scored a game point')
                self.score += GAME_POINT
            else:
                print(f'Player {self.username} scored a point')
                self.score += POINT

95c29d3af13155a449789188830e13f1eb1d290b
<mask token>


class Player:
    <mask token>

    def ball_is_hitted_back(self):
        return bool(random.getrandbits(1))
    <mask token>

<mask token>


class Player:
    <mask token>

    def ball_is_hitted_back(self):
        return bool(random.getrandbits(1))

    def serve_ball(self):
        print(f'Player {self.username} served the ball')
        if self.ball_is_hitted_back():
            print(f'The ball was returned by the other player')
        elif self.score >= 30:
            print(f'Player {self.username} scored a game point')
            self.score += GAME_POINT
        else:
            print(f'Player {self.username} scored a point')
            self.score += POINT

<mask token>


class Player:

    def __init__(self, username):
        self.username = username
        self.score = 0
        self.games_won = 0
        self.sets_won = 0

    def ball_is_hitted_back(self):
        return bool(random.getrandbits(1))

    def serve_ball(self):
        print(f'Player {self.username} served the ball')
        if self.ball_is_hitted_back():
            print(f'The ball was returned by the other player')
        elif self.score >= 30:
            print(f'Player {self.username} scored a game point')
            self.score += GAME_POINT
        else:
            print(f'Player {self.username} scored a point')
            self.score += POINT

import random
from source.constants import POINT, GAME_POINT


class Player:

    def __init__(self, username):
        self.username = username
        self.score = 0
        self.games_won = 0
        self.sets_won = 0

    def ball_is_hitted_back(self):
        return bool(random.getrandbits(1))

    def serve_ball(self):
        print(f'Player {self.username} served the ball')
        if self.ball_is_hitted_back():
            print(f'The ball was returned by the other player')
        elif self.score >= 30:
            print(f'Player {self.username} scored a game point')
            self.score += GAME_POINT
        else:
            print(f'Player {self.username} scored a point')
            self.score += POINT

import random

from source.constants import POINT, GAME_POINT


class Player:

    def __init__(self, username):
        self.username = username
        self.score = 0
        self.games_won = 0
        self.sets_won = 0

    def ball_is_hitted_back(self):
        return bool(random.getrandbits(1))

    def serve_ball(self):
        print(f'Player {self.username} served the ball')

        if self.ball_is_hitted_back():
            print(f'The ball was returned by the other player')
        else:
            if self.score >= 30:
                print(f'Player {self.username} scored a game point')
                self.score += GAME_POINT
            else:
                print(f'Player {self.username} scored a point')
                self.score += POINT
