Skill system

I am quite new to CreepTD and as such I have no idea how the skill system works. I though I had a few ideas until I played the following game: http://www.creeptd.com/en/games/yxggptfa7ajjuvf9xwk3eq8ufl807tjd where despite holding out fairly well on my own, I lost more skill than my partner who quit right at the start.
So basically, my question is, how is the skill calculated for each game?
So basically, my question is, how is the skill calculated for each game?