Skip to main content
deleted 4 characters in body
Source Link
pajonk
  • 18.3k
  • 3
  • 25
  • 74

R, 79 78 76 7575 70 bytes

Edit: -1 byte6 bytes thanks to Dominic van Essen.

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while({show(m);printprint(m<-t(m))-4})m=tprint(m[3:1,])))-2)1

Try it online!Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

R, 79 78 76 75 bytes

Edit: -1 byte thanks to Dominic van Essen.

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while({show(m);print(t(m))-4})m=t(m[3:1,])

Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

R, 79 78 76 75 70 bytes

Edit: -6 bytes thanks to Dominic van Essen.

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while(print(m<-t(print(m[3:1,])))-2)1

Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

added 129 characters in body
Source Link
pajonk
  • 18.3k
  • 3
  • 25
  • 74

R, 79 78 7676 75 bytes

Edit: -1 byte thanks to Dominic van Essen.

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while({show(m);show;print(t(m));m-4})m=t(m[3:1,])

Try it online!Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

R, 79 78 76 bytes

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while({show(m);show(t(m));m-4})m=t(m[3:1,])

Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

R, 79 78 76 75 bytes

Edit: -1 byte thanks to Dominic van Essen.

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while({show(m);print(t(m))-4})m=t(m[3:1,])

Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

added 148 characters in body
Source Link
pajonk
  • 18.3k
  • 3
  • 25
  • 74

R, 79 7878 76 bytes

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
forwhile(i in 1:4){show(m<-t(m[3:1,])m);show(t(m));m-4})m=t(m[3:1,])

Try it online!Try it online!

Hardcodes one square and loops though its rotations and transpositions, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

R, 79 78 bytes

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
for(i in 1:4){show(m<-t(m[3:1,]));show(t(m))}

Try it online!

Hardcodes one square and loops though its rotations and transpositions.

R, 79 78 76 bytes

m=matrix(c(2,7,6,9,5,1,4,3,8),3)
while({show(m);show(t(m));m-4})m=t(m[3:1,])

Try it online!

Hardcodes one square and loops though its rotations, displaying also a transposition with every iteration.

Abuses the fact that while takes only the first element in a vector/matrix to check the looping condition.

added 12 characters in body
Source Link
pajonk
  • 18.3k
  • 3
  • 25
  • 74
Loading
Source Link
pajonk
  • 18.3k
  • 3
  • 25
  • 74
Loading