There are sixteen ways are there to paint the four buildings.
Explanation:
There are certain rules and conditions that are to be kept in mind of the designer of the game before he decides how many ways can the four buildings which are standing in the same row can be painted.
Since there are only four colors and there can be no building which can be colored with two different colors. Moreover two buildings which are standing just next to each other can not be painted in the same color, they have to be of the different colors, so keeping all these things in mind. There comes out to 16 ways of painting the buildings.