This paper studies a class of cooperative games, called graphical cooperative games, where the internal topology of the coalition depends on a prescribed communication graph among players. First, using the semitensor product of matrices, the value function of graphical cooperative games can be expressed as a pseudo-Boolean function. Then, a simple matrix formula is provided to calculate the Shapley value of graphical cooperative games. Finally, some practical examples are presented to illustrate the application of graphical cooperative games in communication-based coalitions and establish the significance of the Shapley value in different communication networks.