Jump to content




Rubik's Cube

game wireless pocket

  • You cannot reply to this topic
No replies to this topic

#1 Kazimir

  • Members
  • 90 posts
  • Locationthat's no moon...

Posted 16 March 2016 - 07:08 PM

It's simple program for play at Rubik's cube with control over rednet.
Uses standard notation UDFBLR, to invert the command, it is necessary to add an apostrophe. (Example: U and U')
Аdditional commands:
С - reset to the initial state
S - random shuffle

Download: pastebin get kr8jAY3L /startup

An example of the control program (install on the pocket computer)
local sModemSide = nil
for n, sSide in ipairs(rs.getSides()) do
  if peripheral.getType(sSide) == "modem" and peripheral.call(sSide, "isWireless") then
	  sModemSide = sSide
	  break
  end
end
local modem = peripheral.wrap(sModemSide)
while 1 do
  term.clear()
  term.setCursorPos(1, 1)
  print("[UDLRFB|SC]")
  term.write("Enter command: ")
  modem.transmit(9991, 9991, io.read())
end

Posted Image

Ported from OpenComputers: https://oc.cil.li/in...ed-rubiks-cube/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users