]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robodim: Added red and blue squares center for random move_around movement.
authorMichal Vokac <vokac.m@gmail.com>
Mon, 23 May 2011 12:33:19 +0000 (14:33 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Mon, 23 May 2011 12:33:19 +0000 (14:33 +0200)
src/robodim/robodim.c
src/robodim/robodim.h

index d31cf01ea914f101daebcfd226215e8cb16ecbd2..eeee9d0e0be0ddf5d4b937bbac831cdb50ca722f 100644 (file)
@@ -45,6 +45,36 @@ const struct king_pos king[KING_CNT] = {
        {200, 290 + 4*280},
        {2800, 290 + 4*280},
 };
+
+const struct square_center_red red_sq[12] = {
+       {0.45 + 0.175 + 0*0.35, 4*0.35 + 0.175},        // row 1
+       {0.45 + 0.175 + 2*0.35, 4*0.35 + 0.175},
+       {0.45 + 0.175 + 4*0.35, 4*0.35 + 0.175},
+       {0.45 + 0.175 + 1*0.35, 3*0.35 + 0.175},        // row 2
+       {0.45 + 0.175 + 3*0.35, 3*0.35 + 0.175},
+       {0.45 + 0.175 + 5*0.35, 3*0.35 + 0.175},
+       {0.45 + 0.175 + 0*0.35, 2*0.35 + 0.175},        // row 3
+       {0.45 + 0.175 + 2*0.35, 2*0.35 + 0.175},
+       {0.45 + 0.175 + 4*0.35, 2*0.35 + 0.175},
+       {0.45 + 0.175 + 1*0.35, 1*0.35 + 0.175},        // row 4
+       {0.45 + 0.175 + 3*0.35, 1*0.35 + 0.175},
+       {0.45 + 0.175 + 5*0.35, 1*0.35 + 0.175},
+};
+
+const struct square_center_blue blue_sq[12] = {
+       {0.45 + 0.175 + 1*0.35, 4*0.35 + 0.175},        // row 1
+       {0.45 + 0.175 + 3*0.35, 4*0.35 + 0.175},
+       {0.45 + 0.175 + 5*0.35, 4*0.35 + 0.175},
+       {0.45 + 0.175 + 0*0.35, 3*0.35 + 0.175},        // row 2
+       {0.45 + 0.175 + 2*0.35, 3*0.35 + 0.175},
+       {0.45 + 0.175 + 4*0.35, 3*0.35 + 0.175},
+       {0.45 + 0.175 + 1*0.35, 2*0.35 + 0.175},        // row 3
+       {0.45 + 0.175 + 3*0.35, 2*0.35 + 0.175},
+       {0.45 + 0.175 + 5*0.35, 2*0.35 + 0.175},
+       {0.45 + 0.175 + 0*0.35, 1*0.35 + 0.175},        // row 4
+       {0.45 + 0.175 + 2*0.35, 1*0.35 + 0.175},
+       {0.45 + 0.175 + 4*0.35, 1*0.35 + 0.175},
+};
 // const struct beacon_pos beacon_green[BEACON_CNT] = {
 //     { 3.062, -0.05},  /* EB2009: one side is 10mm only plexiglass */
 //     {-0.062,  1.05},  /* the rest is 22mm wood */
index bba224818a489df86bc1b8c46a620a999e155746..0145400670ec429f86ea2bbdf6ac04a780d12316 100644 (file)
@@ -183,6 +183,14 @@ struct queen_pos {
        int x, y;
 };
 
+struct square_center_red {
+       float x, y;
+};
+
+struct square_center_blue {
+       float x, y;
+};
+
 extern const struct beacon_pos beacon_green[BEACON_CNT];
 extern const struct beacon_pos beacon_red[BEACON_CNT];
 extern const struct bonus_pos bonus[BONUS_CNT];
@@ -190,6 +198,9 @@ extern const struct pawn_pos pawn[PAWN_CNT];
 extern const struct king_pos king[KING_CNT];
 extern const struct queen_pos queen[QUEEN_CNT];
 
+extern const struct square_center_red red_sq[12];
+extern const struct square_center_blue blue_sq[12];
+
 /*
  * Position of Shapr sensors on the robot with respect to the robot center
  * (not used in EB2009)