Howto communicate using the manager

The Manager allows different components of McBilliards to communicate in an indirect way. Throughout this document we will use M to denote an object of type Manager in McBilliards.

Basic Communication

Objects in McBilliards can send and recieve messages. Here a message is just an object of any type. Objects are sent using the command
M.mcbSend(obj);
Objects are recieved by functions of the form
public void mcbReceive(ObjectType obj){...do something...}

Caching Messages

If you tell it to, the Manager can store the last message sent of a given type. In this way, a component still has access to this message even if it is "popped up" after the message was sent. (For example, this is used for tiles, colors, and points in the parameter space).
Common Message Types

While you can send any object you wish through mcbSend, some message types will be of interest to many components.

PAT'S HOME >>>>> McBILLIARDS >>>>> DEVELOPMENT