From 6db0f054898e6873a32f392a2b8abe330f95a3b4 Mon Sep 17 00:00:00 2001 From: Jérôme Jutteau Date: Thu, 2 Jun 2011 17:11:55 +0200 Subject: digital/io-hub: make small towers if possible --- digital/io-hub/src/robospierre/logistic.c | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'digital/io-hub/src/robospierre') 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); -- cgit v1.2.3