Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
for challenges involving board games.
2
votes
Complete the landscape
Python3, 301 bytes:
E=enumerate
def f(b):
for x,r in E(b):
for y,P in E(r):
if[]==P:return[i for i in[[v//d%3for d in(1,3,9,27)]for v in b"[$)'S>QPYDZ&_<( G"]if any(all(X in(Y,[])for X,Y in zip( …
2
votes
Totally random Catan number distributions
Python 3, 391 bytes:
from random import*
R=range
P=lambda i:' '*int((9-(i*2-1))/2)
def b():
while 1:
t=[*'2C.'+'345689AB'*2];shuffle(t)
B,f=[P(i)+' '.join(t.pop(0)for _ in R(i))+P(i)for i in[3,4, …
2
votes
Where can the cannon go?
Python3, 309 bytes:
def f(t,b):
q=[(*t,0,b[t[0]][t[1]],*i)for i in[(0,1),(0,-1),(1,0),(-1,0)]]
while q:
x,y,d,c,X,Y=q.pop(0)
if 0<=(j:=x+X)<len(b)and 0<=(k:=y+Y)<len(b[0])and d<2:
if'.'==(S:= …
1
vote
Count the Liberties - Advanced
Python3, 510 bytes:
E=enumerate
def S(b,x,y):
for X,Y in[(0,1),(0,-1),(1,0),(-1,0)]:
try:
if(A:=x+X)>=0 and(B:=y+Y)>=0:yield(A,B,b[A][B])
except:1
def f(b):
a,s=[],[]
while(o:=[(x,y,c)for x, …
1
vote
Reveal all clues of Black Box
Python3, 935 bytes:
E=enumerate
S=lambda b,x:(x+1==len(b)or x==0)*[1,-1][x>0]
def F(b,C,v,x,y,q,w,c=0):
if int==type(b[x][y])and c:b[x][y]=[v,'R'][C==(x,y)];return
if b[x][y]=='O':b[C[0]][C[1]]='H'; …