An interesting variant. This game adds secret information, so changes it from a game of perfect information, where both players can see everything to a game where the players hold a secret.
Rooks often last a long time in chess, so it makes me wonder if placing a flag with a rook is a good plan. But your opponent knows about that too, so maybe you can trick him out by giving the flag to a knight (or even a pawn). The game could have some surprise endings!
Not sure what your display looks like, but this chess graphic has some problems on my PC (see this):
The pieces are clipped. But this is not related to the game - it's a cool game idea.
I'm sorry if this has been invented before, but this type of chess is called "capture the flag". @Vickalin or @Martin0 can you help me develop this variant? You don't have to.