Monte-Carlo simulation of polymers confined between flat plates