From: Mart Lubbers Date: Thu, 4 Jun 2015 11:37:43 +0000 (+0200) Subject: rounds done X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=3dc116920c097454085d0f3e74df68db8093316c;p=fp1415-soccerfun.git rounds done --- diff --git a/src/SoccerFun.prj b/src/SoccerFun.prj index c1e0db6..daf6db4 100755 --- a/src/SoccerFun.prj +++ b/src/SoccerFun.prj @@ -1,7 +1,7 @@ Version: 1.4 Global ProjectRoot: . - Built: True + Built: False Target: SoccerFun64 Exec: {Project}\SoccerFun.exe CodeGen diff --git a/src/StdTeam/Team_Student_Rounds_Assignment.icl b/src/StdTeam/Team_Student_Rounds_Assignment.icl old mode 100644 new mode 100755 index e10bc7f..a68889c --- a/src/StdTeam/Team_Student_Rounds_Assignment.icl +++ b/src/StdTeam/Team_Student_Rounds_Assignment.icl @@ -8,6 +8,7 @@ implementation module Team_Student_Rounds_Assignment Do not change the implementation of base_TeamName_Student_Rounds. */ import Footballer +import FootballerFunctions Team_Student_Rounds :: !Home !FootballField -> Team Team_Student_Rounds home field = if (home == West) team (mirror field team) @@ -18,14 +19,18 @@ where ] club = base_TeamName_Student_Rounds +++ if (home==West) "_W" "_E" positions = [(-0.49,0.00)] - footballer playerID = {defaultFootballer playerID & - name = "Peter88", - brain = {memory = Void, ai = mind}} + footballer playerID = {defaultFootballer playerID & name = "Peter88", brain = {memory = Void, ai = mind field}} base_TeamName_Student_Rounds :: String base_TeamName_Student_Rounds = "Student Rounds" -:: Memory :== Void - -mind :: !(!BrainInput, !Memory) -> (!BrainOutput, !Memory) -mind ({football, others, me}, memory) = (Move zero zero) +mind :: !FootballField !(!BrainInput, !Void) -> (!BrainOutput, !Void) +mind field (i=:{me}, mm) +| y >= (t -o) && x > (~r+o) = (fix {px= ~r,py= t} c) (i, mm) +| x <= (~r+o) && y > (~t+o) = (fix {px= ~r,py= ~t} c) (i, mm) +| y <= (~t+o) && x < (r -o) = (fix {px= r, py= ~t} c) (i, mm) +| x >= (r -o) && y < (t -o) = (fix {px= r, py= t} c) (i, mm) + where + (x, y, o, c) = (me.pos.px, me.pos.py, m 4.0, m 1.5) + t = scale 0.5 field.fwidth + r = scale 0.5 field.flength \ No newline at end of file