From 66e1ef230f6dde74da99bd1795893cbbcf2b1a64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9tro?= <yann.roberge@polymtl.ca>
Date: Sun, 18 Oct 2020 17:51:38 -0400
Subject: [PATCH] =?UTF-8?q?Ajout=20des=20squelettes=20de=20classes=20d?=
 =?UTF-8?q?=C3=A9riv=C3=A9es=20'bucheron'=20et=20'excavatrice'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 bucher.lua  | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 excaver.lua | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 test.lua    | 23 +++++++++++++++++++++++
 3 files changed, 122 insertions(+)
 create mode 100644 bucher.lua
 create mode 100644 excaver.lua
 create mode 100644 test.lua

diff --git a/bucher.lua b/bucher.lua
new file mode 100644
index 0000000..5695cbb
--- /dev/null
+++ b/bucher.lua
@@ -0,0 +1,49 @@
+-- bucher.lua
+-- Created on:  2020-10-16
+-- Author:      Rétro
+--
+-- API d'abattage d'arbres pour tortures RSI
+
+---
+-- \class Bucheron RSI
+local RSI_Bucheron = {}
+RSI_Bucheron.__index = RSI_Bucheron
+
+rsiT = require("rsiTurtle")
+
+---
+-- \brief Constructeur de RSI_Bucheron
+function RSI_Bucheron:init()
+    local bucheron = {}
+    setmetatable(bucheron,RSI_Bucheron)
+
+    ---
+    -- \brief Objet parent
+    bucheron.base_ = rsiT:init()
+
+    return bucheron
+end
+
+---
+-- \brief Affiche la position et l'orientation du bucheron
+function RSI_Bucheron:print()
+    self.base_:print()
+end
+
+---
+-- \brief Abattre un arbre
+-- \return bool Succès
+function RSI_Bucheron:chopTree()
+    --TODO: Implementer
+end
+
+---
+-- \brief Couper les arbres dans la zone
+-- \param int nLignes   Nombre de lignes
+-- \param int nColonnes Nombre de colonnes
+-- \return bool Succès
+function RSI_Bucheron:main(nLignes, nColonnes)
+    --TODO: Implementer
+end
+
+return RSI_Bucheron
diff --git a/excaver.lua b/excaver.lua
new file mode 100644
index 0000000..b019800
--- /dev/null
+++ b/excaver.lua
@@ -0,0 +1,50 @@
+-- excaver.lua
+-- Created on:  2020-10-17
+-- Author:      Rétro
+--
+-- API d'excavation de terrain
+
+---
+-- \class Bucheron RSI
+local RSI_Excavatrice = {}
+RSI_Excavatrice.__index = RSI_Excavatrice
+
+rsiT = require("rsiTurtle")
+
+---
+-- \brief Constructeur de RSI_Bucheron
+function RSI_Excavatrice:init()
+    local excavatrice = {}
+    setmetatable(excavatrice,RSI_Excavatrice)
+
+    ---
+    -- \brief Objet parent
+    excavatrice.base_ = rsiT:init()
+
+    return excavatrice
+end
+
+---
+-- \brief Affiche la position et l'orientation de l'excavatrice
+function RSI_Excavatrice:print()
+    self.base_:print()
+end
+
+---
+-- \brief Abattre un arbre
+-- \return bool Succès
+--function RSI_Excavatrice:chopTree()
+    --TODO: Implementer
+--end
+
+---
+-- \brief Dégager la zone vers le bas
+-- \param int nLignes   Nombre de lignes
+-- \param int nColonnes Nombre de colonnes
+-- \param int nLignes   Profondeur z (vers le bas) sur laquelle excaver
+-- \return bool Succès
+function RSI_Excavatrice:main(nLignes, nColonnes, profondeur)
+    --TODO: Implementer
+end
+
+return RSI_Excavatrice
diff --git a/test.lua b/test.lua
new file mode 100644
index 0000000..8f99162
--- /dev/null
+++ b/test.lua
@@ -0,0 +1,23 @@
+-- bucher.lua
+-- Created on:  2020-10-17
+-- Author:      Rétro
+-- 
+-- Tests pour tortues RSI
+--
+rsiT = require("rsiTurtle")
+rsiB = require("bucher")
+rsiE = require("excaver")
+
+rsiT.helloWorld()
+
+print("Test de RSI_Turtle")
+t = rsiT:init()
+t:print()
+
+print("Test de RSI_Bucheron")
+b = rsiB:init()
+b:print()
+
+print("Test de RSI_Excavatrice")
+e = rsiE:init()
+e:print()
-- 
GitLab