migrate to the new for-loop syntax
Drop the ':' before captures (for xs (x) / for 0..n (i)); the index capture becomes the trailing open range (for xs, 0.. (x, i)). 136 headers across 26 files, mechanical. Five headless tests (banner_layout, hit_test, swipe_commit, swipe_intent, swipe_reshuffle) also gain a direct #import "modules/ui/types.sx" — they named Point/Frame through a transitive import, which bare visibility no longer permits. Gates: sx build --target ios-sim main.sx links; tools/run_tests.sh 23/23.
This commit is contained in:
@@ -12,14 +12,14 @@ SEED :: 1337;
|
||||
// independently of the placement logic, so it's a real check, not a tautology.
|
||||
count_three_runs :: (b: *Board) -> s32 {
|
||||
runs : s32 = 0;
|
||||
for 0..BOARD_ROWS: (row) {
|
||||
for 0..(BOARD_COLS - 2): (col) {
|
||||
for 0..BOARD_ROWS (row) {
|
||||
for 0..(BOARD_COLS - 2) (col) {
|
||||
g := b.at(col, row);
|
||||
if g == b.at(col + 1, row) and g == b.at(col + 2, row) { runs += 1; }
|
||||
}
|
||||
}
|
||||
for 0..(BOARD_ROWS - 2): (row) {
|
||||
for 0..BOARD_COLS: (col) {
|
||||
for 0..(BOARD_ROWS - 2) (row) {
|
||||
for 0..BOARD_COLS (col) {
|
||||
g := b.at(col, row);
|
||||
if g == b.at(col, row + 1) and g == b.at(col, row + 2) { runs += 1; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user