Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Examples/Defensive_example_strategy/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is for strategy

from util.objects import *
from util.routines import *


class Bot(GoslingAgent):
# This function runs every in-game tick (every time the game updates anything)
def run(self):
self.defend_flag = is_ball_going_towards_goal(self)

# set_intent tells the bot what it's trying to do
if self.intent is not None:
return

if self.kickoff_flag:
self.set_intent(kickoff())
return

print(self.defend_flag)

if self.defend_flag:
self.set_intent(defend_shot())
return