2D tank game for Pattern in Java class