Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Tortues CC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yann Roberge
Tortues CC
Commits
66e1ef23
Commit
66e1ef23
authored
4 years ago
by
Yann Roberge
Browse files
Options
Downloads
Patches
Plain Diff
Ajout des squelettes de classes dérivées 'bucheron' et 'excavatrice'
parent
4c116a14
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bucher.lua
+49
-0
49 additions, 0 deletions
bucher.lua
excaver.lua
+50
-0
50 additions, 0 deletions
excaver.lua
test.lua
+23
-0
23 additions, 0 deletions
test.lua
with
122 additions
and
0 deletions
bucher.lua
0 → 100644
+
49
−
0
View file @
66e1ef23
-- 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
This diff is collapsed.
Click to expand it.
excaver.lua
0 → 100644
+
50
−
0
View file @
66e1ef23
-- 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
This diff is collapsed.
Click to expand it.
test.lua
0 → 100644
+
23
−
0
View file @
66e1ef23
-- 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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment