Skip to content

Instantly share code, notes, and snippets.

View yuvrajkhosa's full-sized avatar

Yuvraj Khosa yuvrajkhosa

View GitHub Profile
@yuvrajkhosa
yuvrajkhosa / food.js
Last active August 31, 2018 02:46
SnakeGame
class Food{
constructor(){
}
pickLoc(){
this.rows = floor(width/scl)
this.cols = floor(height/scl)
this.pos = createVector(floor(random(this.cols)), floor(random(this.rows)));
this.pos.mult(scl);