Converting micropolis java code to cs.