From 78a8f07f655dc7ff426d87001f3ca4d6a8365ded Mon Sep 17 00:00:00 2001 From: haller Date: Wed, 24 May 2006 19:57:13 +0000 Subject: * Début de codage du programme d'homologation du robal --- i/marvin/src/ai/ai.cc | 29 ++++++++++++++++++++++++++++- i/marvin/src/ai/ai.hh | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'i/marvin') diff --git a/i/marvin/src/ai/ai.cc b/i/marvin/src/ai/ai.cc index 1ad1df3..a24dcc7 100644 --- a/i/marvin/src/ai/ai.cc +++ b/i/marvin/src/ai/ai.cc @@ -1,4 +1,4 @@ -// ai.cc +// AI.CC // marvin - programme du robot 2006. {{{ // // Copyright (C) 2006 Nicolas Haller @@ -81,3 +81,30 @@ bool Ai::update (void) } +/// programme d'homologation du robal +void Ai::progHomoloRobal(void) +{ + /// On init le robal + prepare(); + /// PAF BEGIN!!! (lancer le timer) + Timer::startRound(); + /// on avance un poil parce que le mur c'est mal + move(400, 0); + /// On tourne XXX + rotate(-M_PI/4); + /// On cherche au moins une balle (sinon c'est con) + barilletLancement(); + /// XXX Avancer d'une certaine facon pour choper des balles + /// XXX Ouais ba y'a encore ddes truc à faire là + /// On cherche un tru (repositionnement??) + motor_.lockGoodHole(); + motor_.findHole(); + /// On trouve un trou, chouette + /// Aspirer le trou + es_.extraitBalle(); + /// mettre une baballe + es_.deposeBlanche(); + /// Tourner 3 fois en chantant du Mickael Jackson + /// Again.... + /// Fin du match +} diff --git a/i/marvin/src/ai/ai.hh b/i/marvin/src/ai/ai.hh index bde4c4a..2883be9 100644 --- a/i/marvin/src/ai/ai.hh +++ b/i/marvin/src/ai/ai.hh @@ -65,5 +65,7 @@ class Ai bool update (void); /// La célèbre fonction sync bool sync (void); + /// programme d'homologation du robal + void progHomoloRobal(void); }; #endif // ai_hh -- cgit v1.2.3