demo of js mediator pattern using noughts and crosses