Skip to content

Instantly share code, notes, and snippets.

@joshuacox
Created January 11, 2024 20:08
Show Gist options
  • Save joshuacox/b5469b6f2df838d8b4fbbc846907cb05 to your computer and use it in GitHub Desktop.
Save joshuacox/b5469b6f2df838d8b4fbbc846907cb05 to your computer and use it in GitHub Desktop.
abstract marked
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
Shape := class<abstract>:
draw<public>() : void =
Print("Hello, world!")
Circle := class<concrete>(Shape):
draw<override>() : void =
Print("Hello, world! I'm a circle")
Square := class<concrete>(Shape):
draw<override>() : void =
Print("Hello, world! I'm a square")
ShapeFactory := class<abstract>:
createShape<public>() : Shape =
Print("Hello, shape factory! I'm making a shape")
return Shape{}
CircleFactory := class<concrete>(ShapeFactory):
createShape<override>() : Circle =
Print("Hello, circle factory! I'm making a circle")
return Circle{}
SquareFactory := class<concrete>(ShapeFactory):
createShape<override>() : Square =
Print("Hello, square factory! I'm making a square")
return Square{}
factoryofshapes := class(creative_device):
OnBegin<override>()<suspends>:void=
circleFactory := CircleFactory{}
squareFactory := SquareFactory{}
circle := circleFactory.createShape()
square := squareFactory.createShape()
circle.draw()
square.draw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment