Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-rosetta/blob/main/exercises/queen-attack/queen-attack.om # omega-rosetta aien-dev/omega-rosetta Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-rosetta / exercises / queen-attack / queen-attack.om` 15 lines ยท 701 bytes Raw Blame History 1 note Exercism-style exercise "queen-attack": https://exercism.org/tracks/python/exercises/queen-attack 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note Rows and columns run 0 .. 7. create checks one queen's position: 0 valid, 1 row negative, 4 note 2 row past the board, 3 column negative, 4 column past the board (row checked first). 5 note canattack is true when queens at (wr, wc) and (br, bc) share a row, column or diagonal. 6 note Check it with: sh exercise.sh exercises/queen-attack 7 om2 8 fn create row long col long to int 9 note replace this line with your solution 10 trap 13 11 end 12 fn canattack wr long wc long br long bc long to bool 13 note replace this line with your solution 14 trap 13 15 end