summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Jutteau2011-06-02 17:11:55 +0200
committerNicolas Schodet2011-06-02 15:19:00 +0200
commit6db0f054898e6873a32f392a2b8abe330f95a3b4 (patch)
tree19547339d9e19f674dcdf1ffa96ba409f8746bfa
parente4a7a4d9fe80a0bafa13a01c3573076b856f9271 (diff)
digital/io-hub: make small towers if possible
-rw-r--r--digital/io-hub/src/robospierre/logistic.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/digital/io-hub/src/robospierre/logistic.c b/digital/io-hub/src/robospierre/logistic.c
index 5fe0d548..1132b116 100644
--- a/digital/io-hub/src/robospierre/logistic.c
+++ b/digital/io-hub/src/robospierre/logistic.c
@@ -334,6 +334,38 @@ logistic_make_tower ()
static void
logistic_make_unload ()
{
+ /* Making a small tower. Move head when having pawn. */
+ LOGISTIC_CASE (D, _,
+ e, p, _,
+ H, _, RIGHT, 0);
+
+ LOGISTIC_CASE (D, p,
+ e, e, e,
+ H, _, RIGHT, 0);
+
+ LOGISTIC_CASE (D, _,
+ e, e, e,
+ H, p, RIGHT, 0);
+
+ /* Making a small tower. Move pawn under head. */
+ LOGISTIC_CASE (_, h,
+ _, P, e,
+ _, D, LEFT, 0);
+
+ LOGISTIC_CASE (P, h,
+ e, e, e,
+ _, D, LEFT, 0);
+
+ LOGISTIC_CASE (_, h,
+ e, e, e,
+ P, D, LEFT, 0);
+
+ /* Making a small tower. Finally move head on pawn. */
+ LOGISTIC_CASE (_, H,
+ _, _, D,
+ _, p, LEFT, 1);
+
+ /* Having any element. */
LOGISTIC_CASE (_, _,
_, _, _,
_, a, LEFT, 1);