Skip to content

Iamshola/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-Paced Project: Snake

Overview

This game was created using canvas as an opportunity to understand the basic principles and practice javascript. The repo can be accessed on GitHub and the deployed site can be viewed on Gh-Pages.

Languages and Technologies Used:

  • HTML5
  • CSS3
  • JavaScript (ES6)
  • Git
  • GitHub
  • Google Fonts

Timeframe:

2 days

Snippet of Code

Collision Check

this.checkCollision = function() {
  for (var i=0; i<this.tail.length; i++) {
    if (this.x === this.tail[i].x &&
      this.y === this.tail[i].y) {
      this.total = 0
      this.tail = []
    }
  }
}

Movement of Snake

this.changeDirection = function(direction) {
  switch(direction) {
    case 'Up':
      this.xSpeed = 0
      this.ySpeed = -scale * 1
      break
    case 'Down':
      this.xSpeed = 0
      this.ySpeed = scale * 1
      break
    case 'Left':
      this.xSpeed = -scale * 1
      this.ySpeed = 0
      break
    case 'Right':
      this.xSpeed = scale * 1
      this.ySpeed = 0
      break
  }
}

Course Curriculum

Details of my training and links to more projects whilst at General Assembly - 12 Week Immersive.

Week 1-3 | Module One - Fundamentals

  • HTML5
  • CSS3
  • Sass
  • JavaScript

Week 4

Project 1 : Frogger | GitHub | GH-Pages

Week 5 | Module Two - React

  • React.js
  • Routing
  • RESTFUL API
  • Third-party APIs

Week 6

Project 2 : CocktailBored | GitHub | GH-Pages

Week 7-8 | Module Three - Node and Express

  • RESTFUL Routing
  • Node.js
  • Express
  • Token Authentication & Session Authentication
  • API Creation
  • Mocha and Chai

Week 9

Project 3 : Date-a-base | GitHub | Herouku

Week 10-11 | Module Four - Python and Django

  • Python
  • SQL
  • Django
  • Token Authentication

Week 12

Project 4 : Space | GitHub | Herouku

Contact

Adesola Oni-Shogbonyo
Email : s.oni-shogbonyo@hotmail.co.uk
Portfolio | Linkedin | GitHub

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published