Using Web Player and putting game logic on server

Say I was making a single-player strategy game (not memory intensive) and wanted to prevent people from reading as much source code as possible, is this how to do it?

With the web player, they can only decompile the assets used such as art, textures, etc. The code won’t be accessible.