Rules error
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dal gist collegato e dalla funzione (connected x y), quindi riproduci il caso della griglia cartesiana in cui (= x y) omette i vicini che soddisfano anch’essi quella condizione. Confrontalo con il caso in cui i valori non sono uguali e determina se il comportamento deriva dal codice segnalato o da Datascript. Il lavoro è completato quando la causa è stata identificata e l’insieme previsto dei vicini diagonali è stato confermato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
After asking a couple of questions on the datascript slack, @tonsky asked me to make a gist with my error in it. The function (connected x y) should return a set of all diagonal neighbors of neighbors on a cartesian grid but in cases where the (= x y) it ignores neighbors that are also (= x y).
The gist is at https://gist.github.com/Tavistock/6305de1b890e3a60489544ae139b102f. for background this is for implementing a game of checkers or draughts.
This image shows the degenerate case where the orange highlighted checker is selected and the green squares are it's connected. Notice that (= x y) for the checker.

This image shows the correct highlighting when selecting a different piece and using connected. Notice that (!= x y) for the checker.

My question is whether there is an error in my code and reasoning, or if this is a problem with Datascript.
- Lingua principale
- Clojure
- Stelle
- 5.8k
- Fork
- 318
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tonsky/datascript
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
tonsky/datascript#498 · 1 commento ·
-
Datascript MCP Server Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
tonsky/datascript#489 ·
-
Stack overflow when transacting :db.type/tupleAttrs with a :db.type/ref attr through :db.fn/call Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
tonsky/datascript#483 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
tonsky/datascript#470 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
tonsky/datascript#441 · 1 commento · 3 reazioni ·
Tutte le issue di tonsky/datascript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
.Needs Triage .Team/UXWest Priority:P3 Type:Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
clojure-emacs/cider#4203 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
clj-commons/antq#327 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100