Parallel.For(0, specimens.Count - 1, (i, state) =>
{
var s = specimens[i];
if ( s.age == consts.maxAge )
{
s.Delete = true;
}
else
{
s.age++;
int ox, oy;
plyr.pd.Invoke(b.getView(s.pos.x, s.pos.y), s.g, rnd, out ox, out oy);
var sstate = b.move(s.pos, ox, oy, out npos);
s.pos = npos;
if ( sstate == SpecimenState.Win )
{
s.score++;
plyr.score++;
resetSpecimen(s);
}
else if ( sstate == SpecimenState.Dead )
{
s.Delete = true;
}
}
});
for ( int i = specimens.Count - 1; i >= 0; i-- )
{
if ( specimens[i].Delete )
{
specimens.RemoveAt(i);
}
}
UGFyYWxsZWwuRm9yKDAsIHNwZWNpbWVucy5Db3VudCAtIDEsIChpLCBzdGF0ZSkgPT4KCQkJCQkJCQkJCQkJCXsKCQkJCQkJCQkJCQkJCQl2YXIgcyA9IHNwZWNpbWVuc1tpXTsKCgkJCQkJCQkJCQkJCQkJaWYgKCBzLmFnZSA9PSBjb25zdHMubWF4QWdlICkKCQkJCQkJCQkJCQkJCQl7CgkJCQkJCQkJCQkJCQkJCXMuRGVsZXRlID0gdHJ1ZTsKCQkJCQkJCQkJCQkJCQl9CgkJCQkJCQkJCQkJCQkJZWxzZQoJCQkJCQkJCQkJCQkJCXsKCQkJCQkJCQkJCQkJCQkJcy5hZ2UrKzsKCgkJCQkJCQkJCQkJCQkJCWludCBveCwgb3k7CgoJCQkJCQkJCQkJCQkJCQlwbHlyLnBkLkludm9rZShiLmdldFZpZXcocy5wb3MueCwgcy5wb3MueSksIHMuZywgcm5kLCBvdXQgb3gsIG91dCBveSk7CgoJCQkJCQkJCQkJCQkJCQlCb2FyZC5Qb3NpdGlvbiBucG9zOwoJCQkJCQkJCQkJCQkJCQl2YXIgc3N0YXRlID0gYi5tb3ZlKHMucG9zLCBveCwgb3ksIG91dCBucG9zKTsKCQkJCQkJCQkJCQkJCQkJcy5wb3MgPSBucG9zOwoKCQkJCQkJCQkJCQkJCQkJaWYgKCBzc3RhdGUgPT0gU3BlY2ltZW5TdGF0ZS5XaW4gKQoJCQkJCQkJCQkJCQkJCQl7CgkJCQkJCQkJCQkJCQkJCQlzLnNjb3JlKys7CgkJCQkJCQkJCQkJCQkJCQlwbHlyLnNjb3JlKys7CgkJCQkJCQkJCQkJCQkJCQlyZXNldFNwZWNpbWVuKHMpOwoJCQkJCQkJCQkJCQkJCQl9CgkJCQkJCQkJCQkJCQkJCWVsc2UgaWYgKCBzc3RhdGUgPT0gU3BlY2ltZW5TdGF0ZS5EZWFkICkKCQkJCQkJCQkJCQkJCQkJewoJCQkJCQkJCQkJCQkJCQkJcy5EZWxldGUgPSB0cnVlOwoJCQkJCQkJCQkJCQkJCQl9CgkJCQkJCQkJCQkJCQkJfQoJCQkJCQkJCQkJCQkJfSk7CgoJCQkJZm9yICggaW50IGkgPSBzcGVjaW1lbnMuQ291bnQgLSAxOyBpID49IDA7IGktLSApCgkJCQl7CgkJCQkJaWYgKCBzcGVjaW1lbnNbaV0uRGVsZXRlICkKCQkJCQl7CgkJCQkJCXNwZWNpbWVucy5SZW1vdmVBdChpKTsKCQkJCQl9CgkJCQl9
Main.java:1: error: class, interface, or enum expected
Parallel.For(0, specimens.Count - 1, (i, state) =>
^
Main.java:5: error: class, interface, or enum expected
if ( s.age == consts.maxAge )
^
Main.java:8: error: class, interface, or enum expected
}
^
Main.java:13: error: class, interface, or enum expected
int ox, oy;
^
Main.java:15: error: class, interface, or enum expected
plyr.pd.Invoke(b.getView(s.pos.x, s.pos.y), s.g, rnd, out ox, out oy);
^
Main.java:17: error: class, interface, or enum expected
Board.Position npos;
^
Main.java:18: error: class, interface, or enum expected
var sstate = b.move(s.pos, ox, oy, out npos);
^
Main.java:19: error: class, interface, or enum expected
s.pos = npos;
^
Main.java:21: error: class, interface, or enum expected
if ( sstate == SpecimenState.Win )
^
Main.java:24: error: class, interface, or enum expected
plyr.score++;
^
Main.java:25: error: class, interface, or enum expected
resetSpecimen(s);
^
Main.java:26: error: class, interface, or enum expected
}
^
Main.java:30: error: class, interface, or enum expected
}
^
Main.java:34: error: class, interface, or enum expected
for ( int i = specimens.Count - 1; i >= 0; i-- )
^
Main.java:34: error: class, interface, or enum expected
for ( int i = specimens.Count - 1; i >= 0; i-- )
^
Main.java:34: error: class, interface, or enum expected
for ( int i = specimens.Count - 1; i >= 0; i-- )
^
Main.java:39: error: class, interface, or enum expected
}
^
17 errors