This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pos = [0,0] | |
var dir = [1,1] | |
var vel = 5 | |
let bou = [600, 400] | |
class Ball { | |
constructor() { | |
this.x = random(bou[0]); | |
this.y = random(bou[1]); | |
this.diameter = 80; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wall = { | |
x : 400, | |
y : 400 | |
} | |
var player = { | |
x : 0, | |
y : 0, | |
width : 10, | |
height : 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ball = { | |
x : 150, y : 200, | |
dir : { | |
x: 1, y:1 | |
} | |
} | |
var wall = {x: 400, y:400} | |
var score = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class brick { | |
constructor(x, y) { | |
this.x = x; | |
this.y = y; | |
} | |
destroy(){ | |
this.x = 10000000; | |
this.y = 10000000; | |
} | |
draw(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"image/color" | |
"fyne.io/fyne/v2" | |
"fyne.io/fyne/v2/app" | |
"fyne.io/fyne/v2/canvas" | |
fatih "github.com/fatih/color" |