50 likes | 175 Views
Rollerslam Environment Model. <<interface>> Visitor + visit (obj : World) + visit (obj : WorldObject) + visit (obj : AnimatedObject) + visit (obj : Ball) + visit (obj : OutTrack) + visit (obj : Player). <<enumeration>> PlayerTeam TEAM_A TEAM_B. OutTrack + WIDTH : Integer = 188000
E N D
<<interface>> Visitor + visit (obj : World) + visit (obj : WorldObject) + visit (obj : AnimatedObject) + visit (obj : Ball) + visit (obj : OutTrack) + visit (obj : Player) <<enumeration>> PlayerTeam TEAM_A TEAM_B OutTrack + WIDTH : Integer = 188000 + HEIGHT : Integer = 138000 + Create ( ) + accpet (visitor : Visitor) Ball + Create ( ) + Create (psx : Integer, psy : Integer) + accpet (visitor : Visitor) <<interface>> Visitable + accept (visitor : Visitor) World + outTrack : OutTrack + ball : Ball + playersA : Player[2] + playersB : Player[2] + create() + accept (visitor : Visitor) AnimatedObject + vx : Integer = 0 + vy : Integer = 0 + ax : Integer = 0 + ay : Integer = 0 + Create ( ) + Create (psx : Integer, psy : Integer, pwidth : Integer, pheight : Integer) + accpet (visitor : Visitor) WorldObject + sx : Integer = 0 + sy : Integer = 0 + width : Integer = 0 + height : Integer = 0 + Create ( ) + Create (psx : Integer, psy : Integer, pwidth : Integer, pheight : Integer) + collidesWith (obj : WorldObject) : Boolean + accpet (visitor : Visitor) Player + team : PlayerTeam + WIDTH : Integer = 1000; + HEIGHT : Integer = 1000; + Create ( ) + Create (psx : Integer, psy : Integer, t : PlayerTeam) + accpet (visitor : Visitor)
WorldObject + sx : Integer = 0 + sy : Integer = 0 + width : Integer = 0 + height : Integer = 0 + collidesWith (obj : WorldObject) : Boolean + accept (visitor : Visitor) <<enumeration>> PlayerTeam TEAM_A TEAM_B <<interface>> Visitable + accept (visitor : Visitor) Ball + accept (visitor : Visitor) AnimatedObject + vx : Integer = 0 + vy : Integer = 0 + ax : Integer = 0 + ay : Integer = 0 + accept (visitor : Visitor) OutTrack + WIDTH : Integer = 188000 {readonly} + HEIGHT : Integer = 138000 {readonly} + accept (visitor : Visitor) Goal + WIDTH : Integer = ??? {readonly} + HEIGHT : Integer = ??? {readonly} + accept (visitor : Visitor) Basket + WIDTH : Integer = ??? {readonly} + HEIGHT : Integer = ??? {readonly} + accept (visitor : Visitor) Player + team : PlayerTeam + WIDTH : Integer = 1000 {readonly} + HEIGHT : Integer = 1000 {readonly} + accept (visitor : Visitor)
<<interface>> Visitable + accept (visitor : Visitor) World + accept (visitor : Visitor) OutTrack 1 +outTrack Player 1 1 +playersA 20 1 1 20 +ball 1 1 +playersB Ball 1 +goalA 1 Basket Goal 1 3 1 +goalB +baskets