2d discrete box simulation