Files
pplus-web/mojo/corpus/quest/starters/MQ_503.mojo
T
2026-10-05 03:03:38 +00:00

19 lines
370 B
Mojo

struct FrameCounter(Copyable, Movable):
var count: Int
def __init__(out self, count: Int):
self.count = count
def increment(self):
self.count += 1
def get(self) -> Int:
return self.count
def main():
var counter = FrameCounter(0)
counter.increment()
counter.increment()
print("Frames handled:", counter.get())