From f50a7e8d96cb8daf95b5e3f422f1350237d34dc3 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 8 May 2013 19:58:05 +0200 Subject: digital/io-hub/src/apbirthday: add cannon fire in simple strat --- digital/io-hub/src/apbirthday/strat.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'digital/io-hub/src/apbirthday/strat.cc') diff --git a/digital/io-hub/src/apbirthday/strat.cc b/digital/io-hub/src/apbirthday/strat.cc index d92f98bd..446b8b7a 100644 --- a/digital/io-hub/src/apbirthday/strat.cc +++ b/digital/io-hub/src/apbirthday/strat.cc @@ -34,6 +34,8 @@ Strat::decision (Position &pos) static int step; static const int plate_app = pg_plate_size_border + BOT_SIZE_RADIUS + 20; static const int plate_load = pg_plate_size_border + BOT_SIZE_BACK - 40; + if (step > 4) + step = 2; switch (step++) { case 0: @@ -65,11 +67,17 @@ Strat::decision (Position &pos) pos.v = (vect_t) { 900, pg_gifts_distance + BOT_SIZE_SIDE }; pos.a = 0; return GIFTS; - case 2: default: + case 2: pos.v = pg_cake_pos; pos.a = 0; return CANDLES; + case 4: + if (team_color) + pos = pg_position_deg (1500, 1200, 90); + else + pos = pg_position_deg (1500 - 200, 1200, 90); + return CANNON; } } -- cgit v1.2.3