Untitled
unknown
scala
2 years ago
329 B
4
Indexable
package o1.flappy import o1.* class Game: val bug = Bug(Pos(100.0, 40.0)) val obstacle = Obstacle(70, Pos(1000.0, 100.0)) def timePasses() = this.bug.fall() this.obstacle.approach() def activateBug() = this.bug.flap(15) def isLost = this.obstacle.touches(this.bug) || this.bug.isInBounds()
Editor is loading...