A pirate wants to reach a Treasure Island located upwind. To do so, he needs to manage the boat direction and the sail setting according to the wind direction.
If he doesn't manage them well, his best enemy would reach the island before him or the wind would make him drift up to the army located downwind.
CANVAS, update the boat position according to wind, boat and settings.
- Wind shift
- Water stream (incl. shift)
- Level acc. to wind & water shift
- Sharks
buildSplashScreen(){
}
buildGameScreen(){
}
buildGameOverScreen(){
}
Game(){
this.canvas;
}
Game.prototype.startLoop(){
}
Game.prototype.checkCollisions{
}
// Game.prototype.checkOverFlow = function(){}
// Game.prototype.displayNextSquare{}
Game.prototype.clearCanvas = function(){
}
Game.prototype.updateCanvas = function(){
}
Game.prototype.drawCanvas = function(){
}
Game.prototype.setGameOver = function(){
}
Boat(){
this.canvas;
this.x;
this.y;
this.size;
this.boatDirection;
this.sailSetting;
this.efficiency
this.speed;
}
- addEventListener(boatDirection)
- addEventListener(sailSetting)
boat.prototype.draw{
}
boat.prototype.setDirection(){
}
boat.prototype.setSail(){
}
boat.prototype.calculEfficiency(){
}
Wind(){
//this.canvas;
this.direction;
this.intensity;
}
//wind.prototype.draw{}
wind.prototype.shift{
}
- splashScreen()
- buildSplash()
- addEventListener(startGame)
- starGame()
- create new Game()
- game.start()
- gameOver()
- buildGameOver()
- addEventListener(startGame)
- Main - buildDom
- Main - buildSplashScreen
- Main - addEventListener
- Main - buildGameScreen
- Main - buildGameOverScreen
- Game - buildCanvas
- Game - clearCanvas
- Game - updateCanvas
- Game - drawCanvas
- Game - setGameOver
- Game - collision
- Game - addEventListener(startGame)
- Boat - create
- Boat - setDirection
- Boat - setSail
- Boat - calculEfficiency
- Boat - addEventListener(boatDirection)
- Boat - addEventListener(sailSetting)
- Wind - create
- Wind - setDirection
URls for the project repo and deploy Link Repo Link Deploy
URls for the project presentation (slides) https://docs.google.com/presentation/d/1PZSjzkocxsTua1_kSc6NvyLzslaYmE3OWKzLxPaRD0s/edit#slide=id.p