Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication via addition to Team #133

Open
cooljoseph1 opened this issue Apr 24, 2020 · 3 comments
Open

Communication via addition to Team #133

cooljoseph1 opened this issue Apr 24, 2020 · 3 comments
Labels
engine engine-breaker-$$$ Winner of the Battlehack 2020 engine breaker prize!

Comments

@cooljoseph1
Copy link

You can add values to Team and use it for communication. E.g., the overlord can initially set
Team.RUSH = False
and later change it to
Team.RUSH = True
and the pawns can detect it.

@cooljoseph1
Copy link
Author

You can do the same thing by editing RobotType as well.

@cooljoseph1
Copy link
Author

cooljoseph1 commented Apr 24, 2020

Here's some sample code:

#bot.py
x = 0

def turn():
    global x
    x += 1
    board_size = get_board_size()
    team = get_team()
    opp_team = Team.WHITE if team == Team.BLACK else team.BLACK
    robottype = get_type()

    if robottype == RobotType.OVERLORD:
        RobotType.RUSH = True if x > 10 else False
        if team == Team.WHITE:
            index = 0
        else:
            index = board_size - 1

        for i in range(board_size):
            if not check_space(index, i):
                spawn(index, i)
                break

    else:
        log(str(RobotType.RUSH))

@arvid220u
Copy link
Contributor

omg nice

@arvid220u arvid220u added engine-breaker-$$$ Winner of the Battlehack 2020 engine breaker prize! and removed 🤑? labels Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine engine-breaker-$$$ Winner of the Battlehack 2020 engine breaker prize!
Projects
None yet
Development

No branches or pull requests

2 participants